summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile21
-rw-r--r--lib/atf/Makefile36
-rw-r--r--lib/atf/Makefile.inc54
-rw-r--r--lib/atf/libatf-c++/Makefile74
-rw-r--r--lib/atf/libatf-c/Makefile76
-rw-r--r--lib/bind/bind9/Makefile.depend17
-rw-r--r--lib/bind/dns/Makefile.depend17
-rw-r--r--lib/bind/isc/Makefile.depend17
-rw-r--r--lib/bind/isccc/Makefile.depend17
-rw-r--r--lib/bind/isccfg/Makefile.depend17
-rw-r--r--lib/bind/lwres/Makefile.depend17
-rw-r--r--lib/clang/Makefile1
-rw-r--r--lib/clang/clang.build.mk42
-rw-r--r--lib/clang/clang.lib.mk2
-rw-r--r--lib/clang/include/Makefile12
-rw-r--r--lib/clang/include/Makefile.depend14
-rw-r--r--lib/clang/include/MipsGenDisassemblerTables.inc2
-rw-r--r--lib/clang/include/MipsGenEDInfo.inc2
-rw-r--r--lib/clang/include/clang/AST/CommentNodes.inc2
-rw-r--r--lib/clang/include/clang/Basic/DiagnosticCommentKinds.inc2
-rw-r--r--lib/clang/include/clang/Basic/Version.inc8
-rw-r--r--lib/clang/include/clang/Driver/CC1Options.inc2
-rw-r--r--lib/clang/include/llvm/Config/AsmParsers.def1
-rw-r--r--lib/clang/include/llvm/Config/Disassemblers.def1
-rw-r--r--lib/clang/include/llvm/Config/config.h14
-rw-r--r--lib/clang/include/llvm/Config/llvm-config.h5
-rw-r--r--lib/clang/libclanganalysis/Makefile1
-rw-r--r--lib/clang/libclanganalysis/Makefile.depend179
-rw-r--r--lib/clang/libclangarcmigrate/Makefile1
-rw-r--r--lib/clang/libclangarcmigrate/Makefile.depend209
-rw-r--r--lib/clang/libclangast/Makefile10
-rw-r--r--lib/clang/libclangast/Makefile.depend489
-rw-r--r--lib/clang/libclangbasic/Makefile3
-rw-r--r--lib/clang/libclangbasic/Makefile.depend45
-rw-r--r--lib/clang/libclangcodegen/Makefile1
-rw-r--r--lib/clang/libclangcodegen/Makefile.depend431
-rw-r--r--lib/clang/libclangdriver/Makefile2
-rw-r--r--lib/clang/libclangdriver/Makefile.depend61
-rw-r--r--lib/clang/libclangedit/Makefile1
-rw-r--r--lib/clang/libclangedit/Makefile.depend29
-rw-r--r--lib/clang/libclangfrontend/Makefile2
-rw-r--r--lib/clang/libclangfrontend/Makefile.depend189
-rw-r--r--lib/clang/libclangfrontendtool/Makefile6
-rw-r--r--lib/clang/libclangfrontendtool/Makefile.depend23
-rw-r--r--lib/clang/libclanglex/Makefile.depend83
-rw-r--r--lib/clang/libclangparse/Makefile1
-rw-r--r--lib/clang/libclangparse/Makefile.depend199
-rw-r--r--lib/clang/libclangrewrite/Makefile2
-rw-r--r--lib/clang/libclangrewrite/Makefile.depend79
-rw-r--r--lib/clang/libclangsema/Makefile2
-rw-r--r--lib/clang/libclangsema/Makefile.depend563
-rw-r--r--lib/clang/libclangserialization/Makefile1
-rw-r--r--lib/clang/libclangserialization/Makefile.depend111
-rw-r--r--lib/clang/libclangstaticanalyzercheckers/Makefile5
-rw-r--r--lib/clang/libclangstaticanalyzercheckers/Makefile.depend749
-rw-r--r--lib/clang/libclangstaticanalyzercore/Makefile4
-rw-r--r--lib/clang/libclangstaticanalyzercore/Makefile.depend365
-rw-r--r--lib/clang/libclangstaticanalyzerfrontend/Makefile1
-rw-r--r--lib/clang/libclangstaticanalyzerfrontend/Makefile.depend41
-rw-r--r--lib/clang/libllvmanalysis/Makefile2
-rw-r--r--lib/clang/libllvmanalysis/Makefile.depend47
-rw-r--r--lib/clang/libllvmarchive/Makefile.depend17
-rw-r--r--lib/clang/libllvmarmasmparser/Makefile.depend31
-rw-r--r--lib/clang/libllvmarmcodegen/Makefile.depend209
-rw-r--r--lib/clang/libllvmarmdesc/Makefile.depend49
-rw-r--r--lib/clang/libllvmarmdisassembler/Makefile.depend27
-rw-r--r--lib/clang/libllvmarminfo/Makefile.depend23
-rw-r--r--lib/clang/libllvmarminstprinter/Makefile.depend25
-rw-r--r--lib/clang/libllvmasmparser/Makefile.depend17
-rw-r--r--lib/clang/libllvmasmprinter/Makefile.depend17
-rw-r--r--lib/clang/libllvmbitreader/Makefile.depend19
-rw-r--r--lib/clang/libllvmbitwriter/Makefile.depend17
-rw-r--r--lib/clang/libllvmcodegen/Makefile5
-rw-r--r--lib/clang/libllvmcodegen/Makefile.depend33
-rw-r--r--lib/clang/libllvmcore/Makefile3
-rw-r--r--lib/clang/libllvmcore/Makefile.depend33
-rw-r--r--lib/clang/libllvmdebuginfo/Makefile.depend17
-rw-r--r--lib/clang/libllvmexecutionengine/Makefile.depend17
-rw-r--r--lib/clang/libllvminstcombine/Makefile.depend43
-rw-r--r--lib/clang/libllvminstrumentation/Makefile1
-rw-r--r--lib/clang/libllvminstrumentation/Makefile.depend21
-rw-r--r--lib/clang/libllvminterpreter/Makefile.depend21
-rw-r--r--lib/clang/libllvmipa/Makefile.depend23
-rw-r--r--lib/clang/libllvmipo/Makefile.depend31
-rw-r--r--lib/clang/libllvmjit/Makefile.depend17
-rw-r--r--lib/clang/libllvmlinker/Makefile.depend17
-rw-r--r--lib/clang/libllvmmc/Makefile7
-rw-r--r--lib/clang/libllvmmc/Makefile.depend17
-rw-r--r--lib/clang/libllvmmcdisassembler/Makefile.depend17
-rw-r--r--lib/clang/libllvmmcjit/Makefile.depend17
-rw-r--r--lib/clang/libllvmmcparser/Makefile.depend17
-rw-r--r--lib/clang/libllvmmipsasmparser/Makefile.depend23
-rw-r--r--lib/clang/libllvmmipscodegen/Makefile11
-rw-r--r--lib/clang/libllvmmipscodegen/Makefile.depend131
-rw-r--r--lib/clang/libllvmmipsdesc/Makefile.depend43
-rw-r--r--lib/clang/libllvmmipsdisassembler/Makefile15
-rw-r--r--lib/clang/libllvmmipsinfo/Makefile.depend23
-rw-r--r--lib/clang/libllvmmipsinstprinter/Makefile3
-rw-r--r--lib/clang/libllvmmipsinstprinter/Makefile.depend19
-rw-r--r--lib/clang/libllvmobject/Makefile.depend17
-rw-r--r--lib/clang/libllvmpowerpccodegen/Makefile1
-rw-r--r--lib/clang/libllvmpowerpccodegen/Makefile.depend111
-rw-r--r--lib/clang/libllvmpowerpcdesc/Makefile.depend43
-rw-r--r--lib/clang/libllvmpowerpcinfo/Makefile.depend23
-rw-r--r--lib/clang/libllvmpowerpcinstprinter/Makefile.depend25
-rw-r--r--lib/clang/libllvmruntimedyld/Makefile.depend17
-rw-r--r--lib/clang/libllvmscalaropts/Makefile.depend59
-rw-r--r--lib/clang/libllvmselectiondag/Makefile.depend29
-rw-r--r--lib/clang/libllvmsupport/Makefile.depend17
-rw-r--r--lib/clang/libllvmtablegen/Makefile1
-rw-r--r--lib/clang/libllvmtablegen/Makefile.depend17
-rw-r--r--lib/clang/libllvmtarget/Makefile.depend17
-rw-r--r--lib/clang/libllvmtransformutils/Makefile.depend41
-rw-r--r--lib/clang/libllvmvectorize/Makefile.depend19
-rw-r--r--lib/clang/libllvmx86asmparser/Makefile.depend33
-rw-r--r--lib/clang/libllvmx86codegen/Makefile.depend127
-rw-r--r--lib/clang/libllvmx86desc/Makefile.depend53
-rw-r--r--lib/clang/libllvmx86disassembler/Makefile.depend23
-rw-r--r--lib/clang/libllvmx86info/Makefile.depend23
-rw-r--r--lib/clang/libllvmx86instprinter/Makefile.depend39
-rw-r--r--lib/clang/libllvmx86utils/Makefile.depend17
-rw-r--r--lib/csu/amd64/Makefile11
-rw-r--r--lib/csu/amd64/Makefile.depend15
-rw-r--r--lib/csu/arm/Makefile.depend15
-rw-r--r--lib/csu/i386-elf/Makefile6
-rw-r--r--lib/csu/i386-elf/Makefile.depend15
-rw-r--r--lib/csu/mips/Makefile.depend15
-rw-r--r--lib/csu/powerpc/Makefile.depend15
-rw-r--r--lib/csu/powerpc64/Makefile.depend15
-rw-r--r--lib/csu/sparc64/Makefile.depend15
-rw-r--r--lib/libalias/libalias/Makefile.depend17
-rw-r--r--lib/libalias/modules/cuseeme/Makefile.depend16
-rw-r--r--lib/libalias/modules/dummy/Makefile.depend16
-rw-r--r--lib/libalias/modules/ftp/Makefile.depend16
-rw-r--r--lib/libalias/modules/irc/Makefile.depend16
-rw-r--r--lib/libalias/modules/nbt/Makefile.depend16
-rw-r--r--lib/libalias/modules/pptp/Makefile.depend16
-rw-r--r--lib/libalias/modules/skinny/Makefile.depend16
-rw-r--r--lib/libalias/modules/smedia/Makefile.depend16
-rw-r--r--lib/libarchive/Makefile5
-rw-r--r--lib/libarchive/Makefile.depend16
-rw-r--r--lib/libarchive/config_freebsd.h4
-rw-r--r--lib/libarchive/test/Makefile8
-rw-r--r--lib/libauditd/Makefile.depend16
-rw-r--r--lib/libbegemot/Makefile.depend16
-rw-r--r--lib/libblocksruntime/Makefile.depend16
-rw-r--r--lib/libbluetooth/Makefile.depend16
-rw-r--r--lib/libbsm/Makefile.depend17
-rw-r--r--lib/libbsnmp/libbsnmp/Makefile.depend16
-rw-r--r--lib/libbz2/Makefile.depend16
-rw-r--r--lib/libc++/Makefile21
-rw-r--r--lib/libc/Makefile10
-rw-r--r--lib/libc/Makefile.depend167
-rw-r--r--lib/libc/amd64/SYS.h26
-rw-r--r--lib/libc/amd64/Symbol.map1
-rw-r--r--lib/libc/amd64/gen/rfork_thread.S5
-rw-r--r--lib/libc/amd64/sys/Makefile.inc3
-rw-r--r--lib/libc/amd64/sys/__vdso_gettc.c49
-rw-r--r--lib/libc/amd64/sys/brk.S5
-rw-r--r--lib/libc/amd64/sys/exect.S5
-rw-r--r--lib/libc/amd64/sys/getcontext.S9
-rw-r--r--lib/libc/amd64/sys/pipe.S9
-rw-r--r--lib/libc/amd64/sys/ptrace.S9
-rw-r--r--lib/libc/amd64/sys/reboot.S9
-rw-r--r--lib/libc/amd64/sys/sbrk.S5
-rw-r--r--lib/libc/amd64/sys/setlogin.S9
-rw-r--r--lib/libc/amd64/sys/vfork.S5
-rw-r--r--lib/libc/arm/Symbol.map4
-rw-r--r--lib/libc/arm/gen/__aeabi_read_tp.S6
-rw-r--r--lib/libc/arm/gen/_set_tp.c4
-rw-r--r--lib/libc/compat-43/killpg.213
-rw-r--r--lib/libc/gen/Makefile.inc11
-rw-r--r--lib/libc/gen/Symbol.map5
-rw-r--r--lib/libc/gen/arc4random.c40
-rw-r--r--lib/libc/gen/auxv.c (renamed from lib/libc/gen/aux.c)15
-rw-r--r--lib/libc/gen/clock_getcpuclockid.395
-rw-r--r--lib/libc/gen/clock_getcpuclockid.c41
-rw-r--r--lib/libc/gen/directory.317
-rw-r--r--lib/libc/gen/fstab.c72
-rw-r--r--lib/libc/gen/fts-compat.c12
-rw-r--r--lib/libc/gen/fts.c15
-rw-r--r--lib/libc/gen/ftw.c3
-rw-r--r--lib/libc/gen/getcap.c2
-rw-r--r--lib/libc/gen/getcwd.c2
-rw-r--r--lib/libc/gen/getnetgrent.c42
-rw-r--r--lib/libc/gen/nftw.c16
-rw-r--r--lib/libc/gen/nlist.c2
-rw-r--r--lib/libc/gen/opendir.c3
-rw-r--r--lib/libc/gen/pututxline.c6
-rw-r--r--lib/libc/gen/pwcache.393
-rw-r--r--lib/libc/gen/pwcache.c113
-rw-r--r--lib/libc/gen/rand48.314
-rw-r--r--lib/libc/gen/readpassphrase.c2
-rw-r--r--lib/libc/gen/sem_new.c2
-rw-r--r--lib/libc/gen/signal.319
-rw-r--r--lib/libc/gen/sysconf.c8
-rw-r--r--lib/libc/gen/sysctl.c7
-rw-r--r--lib/libc/gen/syslog.c9
-rw-r--r--lib/libc/i386/SYS.h12
-rw-r--r--lib/libc/i386/Symbol.map1
-rw-r--r--lib/libc/i386/gen/getcontextx.c2
-rw-r--r--lib/libc/i386/gen/rfork_thread.S3
-rw-r--r--lib/libc/i386/sys/Makefile.inc3
-rw-r--r--lib/libc/i386/sys/Ovfork.S3
-rw-r--r--lib/libc/i386/sys/__vdso_gettc.c50
-rw-r--r--lib/libc/i386/sys/brk.S9
-rw-r--r--lib/libc/i386/sys/cerror.S5
-rw-r--r--lib/libc/i386/sys/exect.S3
-rw-r--r--lib/libc/i386/sys/getcontext.S5
-rw-r--r--lib/libc/i386/sys/ptrace.S5
-rw-r--r--lib/libc/i386/sys/sbrk.S9
-rw-r--r--lib/libc/i386/sys/syscall.S5
-rw-r--r--lib/libc/include/libc_private.h7
-rw-r--r--lib/libc/include/port_before.h2
-rw-r--r--lib/libc/locale/Makefile.inc20
-rw-r--r--lib/libc/locale/collate.c10
-rw-r--r--lib/libc/locale/ctype_l.315
-rw-r--r--lib/libc/locale/isgraph.320
-rw-r--r--lib/libc/locale/islower.319
-rw-r--r--lib/libc/locale/ispunct.320
-rw-r--r--lib/libc/locale/isspace.320
-rw-r--r--lib/libc/locale/iswalnum_l.3168
-rw-r--r--lib/libc/locale/ldpart.c2
-rw-r--r--lib/libc/locale/nl_langinfo.316
-rw-r--r--lib/libc/locale/setrunelocale.c21
-rw-r--r--lib/libc/net/Makefile.inc2
-rw-r--r--lib/libc/net/getaddrinfo.c29
-rw-r--r--lib/libc/net/ip6opt.c2
-rw-r--r--lib/libc/net/sctp_sys_calls.c4
-rw-r--r--lib/libc/nls/msgcat.c2
-rw-r--r--lib/libc/rpc/auth_des.c2
-rw-r--r--lib/libc/rpc/auth_unix.c11
-rw-r--r--lib/libc/rpc/authunix_prot.c14
-rw-r--r--lib/libc/rpc/clnt_vc.c4
-rw-r--r--lib/libc/rpc/getnetpath.c3
-rw-r--r--lib/libc/rpc/rpc_generic.c6
-rw-r--r--lib/libc/rpc/rpc_soc.32
-rw-r--r--lib/libc/rpc/svc_auth_des.c2
-rw-r--r--lib/libc/rpc/svc_auth_unix.c2
-rw-r--r--lib/libc/stdio/fopen.36
-rw-r--r--lib/libc/stdio/scanf_l.32
-rw-r--r--lib/libc/stdio/xprintf.c2
-rw-r--r--lib/libc/stdlib/Makefile.inc1
-rw-r--r--lib/libc/stdlib/at_quick_exit.33
-rw-r--r--lib/libc/stdlib/getenv.c10
-rw-r--r--lib/libc/stdlib/getopt_long.c9
-rw-r--r--lib/libc/stdlib/ptsname.33
-rw-r--r--lib/libc/stdlib/ptsname.c4
-rw-r--r--lib/libc/stdlib/quick_exit.33
-rw-r--r--lib/libc/stdlib/rand.315
-rw-r--r--lib/libc/stdlib/rand.c5
-rw-r--r--lib/libc/stdlib/random.320
-rw-r--r--lib/libc/stdlib/random.c34
-rw-r--r--lib/libc/stdlib/realpath.c2
-rw-r--r--lib/libc/stdlib/strfmon.319
-rw-r--r--lib/libc/stdtime/Makefile.inc2
-rw-r--r--lib/libc/stdtime/strftime.313
-rw-r--r--lib/libc/stdtime/strftime.c2
-rw-r--r--lib/libc/stdtime/strptime.314
-rw-r--r--lib/libc/string/Makefile.inc9
-rw-r--r--lib/libc/string/ffs.39
-rw-r--r--lib/libc/string/strcasecmp.323
-rw-r--r--lib/libc/string/strcoll.314
-rw-r--r--lib/libc/string/strerror.36
-rw-r--r--lib/libc/string/strsignal.c42
-rw-r--r--lib/libc/string/strstr.310
-rw-r--r--lib/libc/string/strxfrm.314
-rw-r--r--lib/libc/sys/Makefile.inc4
-rw-r--r--lib/libc/sys/Symbol.map9
-rw-r--r--lib/libc/sys/__vdso_gettimeofday.c142
-rw-r--r--lib/libc/sys/clock_gettime.c52
-rw-r--r--lib/libc/sys/dup.21
-rw-r--r--lib/libc/sys/fcntl.233
-rw-r--r--lib/libc/sys/fcntl.c2
-rw-r--r--lib/libc/sys/gettimeofday.c51
-rw-r--r--lib/libc/sys/kill.223
-rw-r--r--lib/libc/sys/listen.222
-rw-r--r--lib/libc/sys/posix_fadvise.29
-rw-r--r--lib/libc/sys/recv.224
-rw-r--r--lib/libc/sys/sigaction.29
-rw-r--r--lib/libc/sys/sigwait.25
-rw-r--r--lib/libc/sys/sigwaitinfo.25
-rw-r--r--lib/libc/sys/wait.22
-rw-r--r--lib/libc/yp/yplib.c2
-rw-r--r--lib/libcalendar/Makefile.depend15
-rw-r--r--lib/libcam/Makefile.depend16
-rw-r--r--lib/libcom_err/Makefile.depend16
-rw-r--r--lib/libcompat/Makefile.depend16
-rw-r--r--lib/libcompiler_rt/Makefile.depend15
-rw-r--r--lib/libcrypt/Makefile6
-rw-r--r--lib/libcrypt/Makefile.depend20
-rw-r--r--lib/libcrypt/crypt.38
-rw-r--r--lib/libcrypt/crypt.c14
-rw-r--r--lib/libcxxrt/Version.map18
-rw-r--r--lib/libdevinfo/Makefile.depend16
-rw-r--r--lib/libdevstat/Makefile.depend16
-rw-r--r--lib/libdisk/Makefile.depend16
-rw-r--r--lib/libdwarf/Makefile.depend16
-rw-r--r--lib/libdwarf/dwarf.h1
-rw-r--r--lib/libdwarf/dwarf_attrval.c1
-rw-r--r--lib/libdwarf/dwarf_dump.c3
-rw-r--r--lib/libdwarf/dwarf_errmsg.c2
-rw-r--r--lib/libdwarf/dwarf_init.c6
-rw-r--r--lib/libedit/Makefile.depend55
-rw-r--r--lib/libedit/chared.c33
-rw-r--r--lib/libedit/chared.h4
-rw-r--r--lib/libedit/common.c2
-rw-r--r--lib/libedit/edit/readline/Makefile.depend14
-rw-r--r--lib/libedit/editline.3112
-rw-r--r--lib/libedit/editrc.532
-rw-r--r--lib/libedit/el.c70
-rw-r--r--lib/libedit/el.h1
-rw-r--r--lib/libedit/histedit.h13
-rw-r--r--lib/libedit/history.c109
-rw-r--r--lib/libedit/key.c35
-rw-r--r--lib/libedit/key.h4
-rw-r--r--lib/libedit/makelist4
-rw-r--r--lib/libedit/prompt.c50
-rw-r--r--lib/libedit/prompt.h6
-rw-r--r--lib/libedit/read.c90
-rw-r--r--lib/libedit/refresh.c213
-rw-r--r--lib/libedit/search.c4
-rw-r--r--lib/libedit/sig.c78
-rw-r--r--lib/libedit/sig.h11
-rw-r--r--lib/libedit/term.c186
-rw-r--r--lib/libedit/term.h6
-rw-r--r--lib/libedit/tokenizer.c6
-rw-r--r--lib/libedit/tty.c2
-rw-r--r--lib/libedit/vi.c40
-rw-r--r--lib/libelf/Makefile15
-rw-r--r--lib/libelf/Makefile.depend25
-rw-r--r--lib/libelf/elf_errmsg.c2
-rw-r--r--lib/libexpat/Makefile.depend16
-rw-r--r--lib/libfetch/Makefile4
-rw-r--r--lib/libfetch/Makefile.depend22
-rw-r--r--lib/libfetch/common.h2
-rw-r--r--lib/libfetch/file.c10
-rw-r--r--lib/libfetch/http.c28
-rw-r--r--lib/libfetch/http.errors1
-rw-r--r--lib/libgeom/Makefile.depend17
-rw-r--r--lib/libgeom/geom_xml2tree.c41
-rw-r--r--lib/libgpib/Makefile.depend15
-rw-r--r--lib/libgssapi/Makefile.depend17
-rw-r--r--lib/libgssapi/gss_accept_sec_context.36
-rw-r--r--lib/libgssapi/gss_acquire_cred.36
-rw-r--r--lib/libgssapi/gss_add_cred.36
-rw-r--r--lib/libgssapi/gss_add_oid_set_member.36
-rw-r--r--lib/libgssapi/gss_canonicalize_name.36
-rw-r--r--lib/libgssapi/gss_compare_name.38
-rw-r--r--lib/libgssapi/gss_context_time.36
-rw-r--r--lib/libgssapi/gss_create_empty_oid_set.36
-rw-r--r--lib/libgssapi/gss_delete_sec_context.36
-rw-r--r--lib/libgssapi/gss_display_name.36
-rw-r--r--lib/libgssapi/gss_display_status.38
-rw-r--r--lib/libgssapi/gss_duplicate_name.36
-rw-r--r--lib/libgssapi/gss_export_name.36
-rw-r--r--lib/libgssapi/gss_export_sec_context.36
-rw-r--r--lib/libgssapi/gss_get_mic.36
-rw-r--r--lib/libgssapi/gss_import_name.36
-rw-r--r--lib/libgssapi/gss_import_sec_context.36
-rw-r--r--lib/libgssapi/gss_indicate_mechs.36
-rw-r--r--lib/libgssapi/gss_init_sec_context.36
-rw-r--r--lib/libgssapi/gss_inquire_context.36
-rw-r--r--lib/libgssapi/gss_inquire_cred.36
-rw-r--r--lib/libgssapi/gss_inquire_cred_by_mech.36
-rw-r--r--lib/libgssapi/gss_inquire_mechs_for_name.36
-rw-r--r--lib/libgssapi/gss_inquire_names_for_mech.36
-rw-r--r--lib/libgssapi/gss_process_context_token.36
-rw-r--r--lib/libgssapi/gss_release_buffer.36
-rw-r--r--lib/libgssapi/gss_release_cred.36
-rw-r--r--lib/libgssapi/gss_release_name.36
-rw-r--r--lib/libgssapi/gss_release_oid_set.36
-rw-r--r--lib/libgssapi/gss_test_oid_set_member.36
-rw-r--r--lib/libgssapi/gss_unwrap.36
-rw-r--r--lib/libgssapi/gss_verify_mic.36
-rw-r--r--lib/libgssapi/gss_wrap.310
-rw-r--r--lib/libgssapi/gss_wrap_size_limit.36
-rw-r--r--lib/libgssapi/gssapi.32
-rw-r--r--lib/libgssapi/mech.510
-rw-r--r--lib/libipsec/Makefile.depend26
-rw-r--r--lib/libipx/Makefile.depend17
-rw-r--r--lib/libjail/Makefile.depend17
-rw-r--r--lib/libjail/jail.c30
-rw-r--r--lib/libkiconv/Makefile3
-rw-r--r--lib/libkiconv/Makefile.depend16
-rw-r--r--lib/libkvm/Makefile.depend19
-rw-r--r--lib/libkvm/kvm_i386.c1
-rw-r--r--lib/libkvm/kvm_proc.c12
-rw-r--r--lib/liblzma/Makefile.depend16
-rw-r--r--lib/libmagic/Makefile6
-rw-r--r--lib/libmagic/Makefile.depend16
-rw-r--r--lib/libmagic/config.h2
-rw-r--r--lib/libmandoc/Makefile20
-rw-r--r--lib/libmd/Makefile.depend37
-rw-r--r--lib/libmemstat/Makefile.depend17
-rw-r--r--lib/libmemstat/memstat_uma.c2
-rw-r--r--lib/libmilter/Makefile.depend54
-rw-r--r--lib/libmp/Makefile.depend16
-rw-r--r--lib/libncp/Makefile.depend14
-rw-r--r--lib/libnetgraph/Makefile.depend16
-rw-r--r--lib/libngatm/Makefile.depend17
-rw-r--r--lib/libopie/Makefile.depend18
-rw-r--r--lib/libpam/libpam/Makefile.depend40
-rw-r--r--lib/libpam/modules/pam_chroot/Makefile.depend16
-rw-r--r--lib/libpam/modules/pam_deny/Makefile.depend15
-rw-r--r--lib/libpam/modules/pam_echo/Makefile.depend16
-rw-r--r--lib/libpam/modules/pam_exec/Makefile.depend16
-rw-r--r--lib/libpam/modules/pam_ftpusers/Makefile.depend16
-rw-r--r--lib/libpam/modules/pam_group/Makefile.depend16
-rw-r--r--lib/libpam/modules/pam_guest/Makefile.depend16
-rw-r--r--lib/libpam/modules/pam_krb5/Makefile.depend19
-rw-r--r--lib/libpam/modules/pam_krb5/pam_krb5.c21
-rw-r--r--lib/libpam/modules/pam_ksu/Makefile.depend18
-rw-r--r--lib/libpam/modules/pam_lastlog/Makefile.depend16
-rw-r--r--lib/libpam/modules/pam_lastlog/pam_lastlog.82
-rw-r--r--lib/libpam/modules/pam_login_access/Makefile.depend16
-rw-r--r--lib/libpam/modules/pam_nologin/Makefile.depend17
-rw-r--r--lib/libpam/modules/pam_opie/Makefile.depend16
-rw-r--r--lib/libpam/modules/pam_opieaccess/Makefile.depend15
-rw-r--r--lib/libpam/modules/pam_passwdqc/Makefile.depend16
-rw-r--r--lib/libpam/modules/pam_permit/Makefile.depend15
-rw-r--r--lib/libpam/modules/pam_radius/Makefile.depend16
-rw-r--r--lib/libpam/modules/pam_radius/pam_radius.c1
-rw-r--r--lib/libpam/modules/pam_rhosts/Makefile.depend16
-rw-r--r--lib/libpam/modules/pam_rootok/Makefile.depend15
-rw-r--r--lib/libpam/modules/pam_securetty/Makefile.depend16
-rw-r--r--lib/libpam/modules/pam_self/Makefile.depend15
-rw-r--r--lib/libpam/modules/pam_ssh/Makefile.depend18
-rw-r--r--lib/libpam/modules/pam_tacplus/Makefile.depend16
-rw-r--r--lib/libpam/modules/pam_unix/Makefile.depend18
-rw-r--r--lib/libpam/modules/pam_unix/pam_unix.c4
-rw-r--r--lib/libpcap/Makefile.depend32
-rw-r--r--lib/libpcap/config.h8
-rw-r--r--lib/libpmc/Makefile4
-rw-r--r--lib/libpmc/Makefile.depend16
-rw-r--r--lib/libpmc/libpmc.c96
-rw-r--r--lib/libpmc/pmc.ivybridge.3880
-rw-r--r--lib/libpmc/pmc.sandybridge.3116
-rw-r--r--lib/libpmc/pmc.sandybridgeuc.33
-rw-r--r--lib/libpmc/pmc.sandybridgexeon.31023
-rw-r--r--lib/libproc/Makefile10
-rw-r--r--lib/libproc/Makefile.depend14
-rw-r--r--lib/libproc/proc_sym.c77
-rw-r--r--lib/libproc/test/t1-bkpt/t1-bkpt.c6
-rw-r--r--lib/libproc/test/t3-name2sym/t3-name2sym.c1
-rw-r--r--lib/libprocstat/Makefile7
-rw-r--r--lib/libprocstat/Makefile.depend19
-rw-r--r--lib/libprocstat/common_kvm.h3
-rw-r--r--lib/libprocstat/libprocstat.c29
-rw-r--r--lib/libprocstat/libprocstat.h2
-rw-r--r--lib/libprocstat/zfs/Makefile.depend18
-rw-r--r--lib/libradius/Makefile.depend17
-rw-r--r--lib/librpcsec_gss/Makefile.depend16
-rw-r--r--lib/librpcsec_gss/rpc_gss_get_error.32
-rw-r--r--lib/librpcsec_gss/rpc_gss_get_mech_info.32
-rw-r--r--lib/librpcsec_gss/rpc_gss_get_principal_name.32
-rw-r--r--lib/librpcsec_gss/rpc_gss_get_versions.32
-rw-r--r--lib/librpcsec_gss/rpc_gss_getcred.32
-rw-r--r--lib/librpcsec_gss/rpc_gss_is_installed.32
-rw-r--r--lib/librpcsec_gss/rpc_gss_max_data_length.32
-rw-r--r--lib/librpcsec_gss/rpc_gss_mech_to_oid.32
-rw-r--r--lib/librpcsec_gss/rpc_gss_oid_to_mech.32
-rw-r--r--lib/librpcsec_gss/rpc_gss_qop_to_num.32
-rw-r--r--lib/librpcsec_gss/rpc_gss_seccreate.34
-rw-r--r--lib/librpcsec_gss/rpc_gss_set_callback.32
-rw-r--r--lib/librpcsec_gss/rpc_gss_set_defaults.32
-rw-r--r--lib/librpcsec_gss/rpc_gss_set_svc_name.32
-rw-r--r--lib/librpcsec_gss/rpc_gss_svc_max_data_length.32
-rw-r--r--lib/librpcsec_gss/svc_rpcsec_gss.c4
-rw-r--r--lib/librpcsvc/Makefile.depend60
-rw-r--r--lib/librt/Makefile.depend16
-rw-r--r--lib/librtld_db/Makefile.depend14
-rw-r--r--lib/libsbuf/Makefile.depend16
-rw-r--r--lib/libsdp/Makefile.depend18
-rw-r--r--lib/libsm/Makefile.depend155
-rw-r--r--lib/libsmb/Makefile.depend14
-rw-r--r--lib/libsmdb/Makefile.depend25
-rw-r--r--lib/libsmutil/Makefile.depend30
-rw-r--r--lib/libstand/Makefile18
-rw-r--r--lib/libstand/Makefile.depend58
-rw-r--r--lib/libstand/nandfs.c15
-rw-r--r--lib/libstand/nfs.c136
-rw-r--r--lib/libstdbuf/Makefile2
-rw-r--r--lib/libstdbuf/Makefile.depend16
-rw-r--r--lib/libstdthreads/Makefile.depend16
-rw-r--r--lib/libtacplus/Makefile.depend18
-rw-r--r--lib/libtelnet/Makefile.depend20
-rw-r--r--lib/libthr/Makefile.depend15
-rw-r--r--lib/libthr/arch/arm/include/pthread_md.h14
-rw-r--r--lib/libthr/thread/thr_cond.c16
-rw-r--r--lib/libthr/thread/thr_fork.c3
-rw-r--r--lib/libthr/thread/thr_getcpuclockid.c4
-rw-r--r--lib/libthr/thread/thr_getschedparam.c31
-rw-r--r--lib/libthr/thread/thr_info.c6
-rw-r--r--lib/libthr/thread/thr_init.c7
-rw-r--r--lib/libthr/thread/thr_kern.c7
-rw-r--r--lib/libthr/thread/thr_mutex.c16
-rw-r--r--lib/libthr/thread/thr_private.h14
-rw-r--r--lib/libthr/thread/thr_resume_np.c7
-rw-r--r--lib/libthr/thread/thr_setprio.c44
-rw-r--r--lib/libthr/thread/thr_setschedparam.c51
-rw-r--r--lib/libthr/thread/thr_sig.c3
-rw-r--r--lib/libthr/thread/thr_suspend_np.c45
-rw-r--r--lib/libthr/thread/thr_umtx.h16
-rw-r--r--lib/libthread_db/Makefile.depend16
-rw-r--r--lib/libthread_db/libpthread_db.c2
-rw-r--r--lib/libthread_db/libthr_db.c2
-rw-r--r--lib/libufs/Makefile.depend16
-rw-r--r--lib/libugidfw/Makefile.depend16
-rw-r--r--lib/libulog/Makefile.depend17
-rw-r--r--lib/libusb/Makefile3
-rw-r--r--lib/libusb/Makefile.depend16
-rw-r--r--lib/libusb/libusb10.c25
-rw-r--r--lib/libusb/libusb10_io.c10
-rw-r--r--lib/libusb/libusb20.313
-rw-r--r--lib/libusb/libusb20.c9
-rw-r--r--lib/libusb/libusb20.h1
-rw-r--r--lib/libusb/libusb20_int.h2
-rw-r--r--lib/libusb/libusb20_ugen20.c32
-rw-r--r--lib/libusbhid/Makefile.depend16
-rw-r--r--lib/libusbhid/descr.c2
-rw-r--r--lib/libusbhid/parse.c23
-rw-r--r--lib/libusbhid/usbhid.37
-rw-r--r--lib/libutil/Makefile20
-rw-r--r--lib/libutil/Makefile.depend17
-rw-r--r--lib/libutil/auth.356
-rw-r--r--lib/libutil/auth.c36
-rw-r--r--lib/libutil/auth.conf.535
-rw-r--r--lib/libutil/gr_util.c2
-rw-r--r--lib/libutil/humanize_number.c2
-rw-r--r--lib/libutil/login.conf.56
-rw-r--r--lib/libutil/property.32
-rw-r--r--lib/libutil/pw_util.3286
-rw-r--r--lib/libutil/pw_util.c19
-rw-r--r--lib/libvgl/Makefile.depend14
-rw-r--r--lib/libwrap/Makefile.depend17
-rw-r--r--lib/liby/Makefile.depend15
-rw-r--r--lib/libypclnt/Makefile.depend51
-rw-r--r--lib/libz/ChangeLog203
-rw-r--r--lib/libz/FAQ12
-rw-r--r--lib/libz/FREEBSD-upgrade2
-rw-r--r--lib/libz/Makefile14
-rw-r--r--lib/libz/Makefile.depend16
-rw-r--r--lib/libz/README24
-rw-r--r--lib/libz/Symbol.map9
-rw-r--r--lib/libz/Versions.def5
-rw-r--r--lib/libz/adler32.c68
-rw-r--r--lib/libz/contrib/asm686/match.S16
-rw-r--r--lib/libz/crc32.c83
-rw-r--r--lib/libz/crc32.h2
-rw-r--r--lib/libz/deflate.c259
-rw-r--r--lib/libz/deflate.h10
-rw-r--r--lib/libz/doc/algorithm.txt2
-rw-r--r--lib/libz/gzguts.h87
-rw-r--r--lib/libz/gzlib.c165
-rw-r--r--lib/libz/gzread.c418
-rw-r--r--lib/libz/gzwrite.c148
-rw-r--r--lib/libz/infback.c14
-rw-r--r--lib/libz/inffixed.h6
-rw-r--r--lib/libz/inflate.c90
-rw-r--r--lib/libz/inftrees.c46
-rw-r--r--lib/libz/test/example.c (renamed from lib/libz/example.c)82
-rw-r--r--lib/libz/test/infcover.c671
-rw-r--r--lib/libz/test/minigzip.c (renamed from lib/libz/minigzip.c)193
-rw-r--r--lib/libz/trees.c40
-rw-r--r--lib/libz/zconf.h196
-rw-r--r--lib/libz/zlib.318
-rw-r--r--lib/libz/zlib.h309
-rw-r--r--lib/libz/zopen.c12
-rw-r--r--lib/libz/zutil.c24
-rw-r--r--lib/libz/zutil.h98
-rw-r--r--lib/msun/Makefile4
-rw-r--r--lib/msun/Makefile.depend19
-rw-r--r--lib/msun/Symbol.map1
-rw-r--r--lib/msun/i387/s_cos.S10
-rw-r--r--lib/msun/i387/s_sin.S10
-rw-r--r--lib/msun/i387/s_tan.S12
-rw-r--r--lib/msun/ld128/s_expl.c261
-rw-r--r--lib/msun/ld80/s_expl.c304
-rw-r--r--lib/msun/man/cexp.310
-rw-r--r--lib/msun/man/exp.314
-rw-r--r--lib/msun/man/ieee.367
-rw-r--r--lib/msun/src/e_exp.c4
-rw-r--r--lib/msun/src/e_rem_pio2.c6
-rw-r--r--lib/msun/src/e_rem_pio2f.c8
-rw-r--r--lib/msun/src/k_cosf.c6
-rw-r--r--lib/msun/src/k_sinf.c6
-rw-r--r--lib/msun/src/k_tanf.c6
-rw-r--r--lib/msun/src/math.h2
-rw-r--r--lib/msun/src/math_private.h66
-rw-r--r--lib/msun/src/s_cbrtl.c26
-rw-r--r--lib/msun/src/s_cosl.c9
-rw-r--r--lib/msun/src/s_sinl.c9
-rw-r--r--lib/msun/src/s_tanl.c9
-rw-r--r--lib/ncurses/form/Makefile.depend134
-rw-r--r--lib/ncurses/formw/Makefile.depend134
-rw-r--r--lib/ncurses/menu/Makefile.depend95
-rw-r--r--lib/ncurses/menuw/Makefile.depend95
-rw-r--r--lib/ncurses/ncurses/Makefile.depend1807
-rw-r--r--lib/ncurses/ncursesw/Makefile.depend2047
-rw-r--r--lib/ncurses/panel/Makefile.depend62
-rw-r--r--lib/ncurses/panelw/Makefile.depend62
602 files changed, 21512 insertions, 2931 deletions
diff --git a/lib/Makefile b/lib/Makefile
index a366f5f..199e08b 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -85,11 +85,11 @@ SUBDIR= ${SUBDIR_ORDERED} \
libkiconv \
liblzma \
libmagic \
+ libmandoc \
libmemstat \
${_libmilter} \
${_libmp} \
${_libnandfs} \
- ${_libncp} \
${_libngatm} \
libopie \
libpam \
@@ -101,7 +101,6 @@ SUBDIR= ${SUBDIR_ORDERED} \
${_librtld_db} \
${_libsdp} \
${_libsm} \
- ${_libsmb} \
${_libsmdb} \
${_libsmutil} \
libstand \
@@ -119,6 +118,7 @@ SUBDIR= ${SUBDIR_ORDERED} \
libwrap \
liby \
libz \
+ ${_atf} \
${_bind} \
${_clang}
@@ -134,6 +134,10 @@ _csu=csu
# NB: keep these sorted by MK_* knobs
+.if ${MK_ATF} != "no"
+_atf= atf
+.endif
+
.if ${MK_ATM} != "no"
_libngatm= libngatm
.endif
@@ -189,10 +193,6 @@ _libypclnt= libypclnt
.endif
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
-.if ${MK_NCP} != "no"
-_libncp= libncp
-.endif
-_libsmb= libsmb
_libvgl= libvgl
_libproc= libproc
_librtld_db= librtld_db
@@ -200,7 +200,6 @@ _librtld_db= librtld_db
.if ${MACHINE_CPUARCH} == "ia64"
_libefi= libefi
-_libsmb= libsmb
.endif
.if ${MACHINE_CPUARCH} == "mips"
@@ -208,14 +207,6 @@ _libproc= libproc
_librtld_db= librtld_db
.endif
-.if ${MACHINE_CPUARCH} == "powerpc"
-_libsmb= libsmb
-.endif
-
-.if ${MACHINE_CPUARCH} == "sparc64"
-_libsmb= libsmb
-.endif
-
.if ${MK_OPENSSL} != "no"
_libmp= libmp
.endif
diff --git a/lib/atf/Makefile b/lib/atf/Makefile
new file mode 100644
index 0000000..0da9aa8
--- /dev/null
+++ b/lib/atf/Makefile
@@ -0,0 +1,36 @@
+#-
+# Copyright (c) 2011 Google, Inc.
+# 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$
+
+.include <bsd.own.mk>
+
+SUBDIR= \
+ libatf-c \
+ libatf-c++
+
+.ORDER: ${SUBDIR}
+
+.include <bsd.subdir.mk>
diff --git a/lib/atf/Makefile.inc b/lib/atf/Makefile.inc
new file mode 100644
index 0000000..937187a
--- /dev/null
+++ b/lib/atf/Makefile.inc
@@ -0,0 +1,54 @@
+#-
+# Copyright (c) 2011 Google, Inc.
+# 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$
+
+ATF= ${.CURDIR}/../../../contrib/atf
+
+_CFLAGS:= ${CFLAGS}
+_CPPFLAGS:= ${CPPFLAGS}
+_CXXFLAGS:= ${CXXFLAGS}
+
+CFLAGS+= -DHAVE_CONFIG_H
+CFLAGS+= -DATF_ARCH='"${MACHINE}"'
+CFLAGS+= -DATF_BUILD_CC='"${CC}"'
+CFLAGS+= -DATF_BUILD_CFLAGS='"${_CFLAGS}"'
+CFLAGS+= -DATF_BUILD_CPP='"${CPP}"'
+CFLAGS+= -DATF_BUILD_CPPFLAGS='"${_CPPFLAGS}"'
+CFLAGS+= -DATF_BUILD_CXX='"${CXX}"'
+CFLAGS+= -DATF_BUILD_CXXFLAGS='"${_CXXFLAGS}"'
+CFLAGS+= -DATF_CONFDIR='"${CONFDIR}/atf"'
+CFLAGS+= -DATF_INCLUDEDIR='"${INCLUDEDIR}"'
+CFLAGS+= -DATF_LIBDIR='"${LIBDIR}"'
+CFLAGS+= -DATF_LIBEXECDIR='"${LIBEXECDIR}"'
+CFLAGS+= -DATF_MACHINE='"${MACHINE_ARCH}"'
+CFLAGS+= -DATF_M4='"/usr/bin/m4"'
+CFLAGS+= -DATF_PKGDATADIR='"${SHAREDIR}/atf"'
+CFLAGS+= -DATF_SHELL='"/bin/sh"'
+CFLAGS+= -DATF_WORKDIR='"/tmp"'
+
+WARNS?= 3
+
+# vim: syntax=make
diff --git a/lib/atf/libatf-c++/Makefile b/lib/atf/libatf-c++/Makefile
new file mode 100644
index 0000000..71369e2
--- /dev/null
+++ b/lib/atf/libatf-c++/Makefile
@@ -0,0 +1,74 @@
+#-
+# Copyright (c) 2011 Google, Inc.
+# 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$
+
+.include <bsd.init.mk>
+
+LIB= atf-c++
+SHLIB_MAJOR= 1
+
+# libatf-c++ depends on the C version of the ATF library to build.
+DPADD= ${LIBATFC}
+LDADD= -L${.OBJDIR}/../libatf-c -latf-c
+
+.PATH: ${ATF}
+.PATH: ${ATF}/atf-c++
+.PATH: ${ATF}/atf-c++/detail
+
+CFLAGS+= -I${ATF}
+CFLAGS+= -I${.CURDIR}/../libatf-c
+CFLAGS+= -I.
+
+CFLAGS+= -DHAVE_CONFIG_H
+
+SRCS= application.cpp \
+ build.cpp \
+ check.cpp \
+ config.cpp \
+ env.cpp \
+ exceptions.cpp \
+ expand.cpp \
+ fs.cpp \
+ parser.cpp \
+ process.cpp \
+ tests.cpp \
+ text.cpp \
+ ui.cpp
+
+INCS= build.hpp \
+ check.hpp \
+ config.hpp \
+ macros.hpp \
+ tests.hpp \
+ utils.hpp
+INCSDIR= ${INCLUDEDIR}/atf-c++
+
+INCS+= atf-c++.hpp
+INCSDIR_atf-c++.hpp= ${INCLUDEDIR}
+
+MAN= atf-c++-api.3
+
+.include <bsd.lib.mk>
diff --git a/lib/atf/libatf-c/Makefile b/lib/atf/libatf-c/Makefile
new file mode 100644
index 0000000..26fba5c
--- /dev/null
+++ b/lib/atf/libatf-c/Makefile
@@ -0,0 +1,76 @@
+#-
+# Copyright (c) 2011 Google, Inc.
+# 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$
+
+.include <bsd.init.mk>
+
+LIB= atf-c
+SHLIB_MAJOR= 1
+
+.PATH: ${ATF}
+.PATH: ${ATF}/atf-c
+.PATH: ${ATF}/atf-c/detail
+
+CFLAGS+= -I${ATF}
+CFLAGS+= -I${.CURDIR}
+CFLAGS+= -I.
+
+SRCS= build.c \
+ check.c \
+ config.c \
+ dynstr.c \
+ env.c \
+ error.c \
+ fs.c \
+ list.c \
+ map.c \
+ process.c \
+ sanity.c \
+ text.c \
+ user.c \
+ utils.c \
+ tc.c \
+ tp.c \
+ tp_main.c
+
+INCS= build.h \
+ check.h \
+ config.h \
+ defs.h \
+ error.h \
+ error_fwd.h \
+ macros.h \
+ tc.h \
+ tp.h \
+ utils.h
+INCSDIR= ${INCLUDEDIR}/atf-c
+
+INCS+= atf-c.h
+INCSDIR_atf-c.h= ${INCLUDEDIR}
+
+MAN= atf-c-api.3
+
+.include <bsd.lib.mk>
diff --git a/lib/bind/bind9/Makefile.depend b/lib/bind/bind9/Makefile.depend
new file mode 100644
index 0000000..e54ec8c
--- /dev/null
+++ b/lib/bind/bind9/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/bind/dns/Makefile.depend b/lib/bind/dns/Makefile.depend
new file mode 100644
index 0000000..e54ec8c
--- /dev/null
+++ b/lib/bind/dns/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/bind/isc/Makefile.depend b/lib/bind/isc/Makefile.depend
new file mode 100644
index 0000000..e54ec8c
--- /dev/null
+++ b/lib/bind/isc/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/bind/isccc/Makefile.depend b/lib/bind/isccc/Makefile.depend
new file mode 100644
index 0000000..e54ec8c
--- /dev/null
+++ b/lib/bind/isccc/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/bind/isccfg/Makefile.depend b/lib/bind/isccfg/Makefile.depend
new file mode 100644
index 0000000..e54ec8c
--- /dev/null
+++ b/lib/bind/isccfg/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/bind/lwres/Makefile.depend b/lib/bind/lwres/Makefile.depend
new file mode 100644
index 0000000..e54ec8c
--- /dev/null
+++ b/lib/bind/lwres/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/Makefile b/lib/clang/Makefile
index 2d77383..dde515e 100644
--- a/lib/clang/Makefile
+++ b/lib/clang/Makefile
@@ -54,6 +54,7 @@ SUBDIR= libclanganalysis \
libllvmmipsasmparser \
libllvmmipscodegen \
libllvmmipsdesc \
+ libllvmmipsdisassembler \
libllvmmipsinfo \
libllvmmipsinstprinter \
libllvmpowerpccodegen \
diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk
index 67868f1..40dc4ab 100644
--- a/lib/clang/clang.build.mk
+++ b/lib/clang/clang.build.mk
@@ -1,37 +1,41 @@
# $FreeBSD$
-CLANG_SRCS=${LLVM_SRCS}/tools/clang
+CLANG_SRCS= ${LLVM_SRCS}/tools/clang
-CFLAGS+=-I${LLVM_SRCS}/include -I${CLANG_SRCS}/include \
- -I${LLVM_SRCS}/${SRCDIR} ${INCDIR:C/^/-I${LLVM_SRCS}\//} -I. \
- -I${LLVM_SRCS}/../../lib/clang/include \
- -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD \
- -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS #-DNDEBUG
+CFLAGS+= -I${LLVM_SRCS}/include -I${CLANG_SRCS}/include \
+ -I${LLVM_SRCS}/${SRCDIR} ${INCDIR:C/^/-I${LLVM_SRCS}\//} -I. \
+ -I${LLVM_SRCS}/../../lib/clang/include \
+ -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD \
+ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS #-DNDEBUG
# LLVM is not strict aliasing safe as of 12/31/2011
-CFLAGS+= -fno-strict-aliasing
+CFLAGS+= -fno-strict-aliasing
TARGET_ARCH?= ${MACHINE_ARCH}
-CFLAGS+=-DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0\"
+BUILD_ARCH?= ${MACHINE_ARCH}
+TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0
+BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0
+CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \
+ -DLLVM_HOSTTRIPLE=\"${BUILD_TRIPLE}\"
.ifndef LLVM_REQUIRES_EH
-CXXFLAGS+=-fno-exceptions
+CXXFLAGS+= -fno-exceptions
.else
# If the library or program requires EH, it also requires RTTI.
LLVM_REQUIRES_RTTI=
.endif
.ifndef LLVM_REQUIRES_RTTI
-CXXFLAGS+=-fno-rtti
+CXXFLAGS+= -fno-rtti
.endif
-CFLAGS+=-DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\"
+CFLAGS+= -DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\"
.PATH: ${LLVM_SRCS}/${SRCDIR}
-TBLGEN?=tblgen
-CLANG_TBLGEN?=clang-tblgen
-TBLINC+=-I ${LLVM_SRCS}/include -I ${LLVM_SRCS}/lib/Target
+TBLGEN?= tblgen
+CLANG_TBLGEN?= clang-tblgen
+TBLINC+= -I ${LLVM_SRCS}/include -I ${LLVM_SRCS}/lib/Target
Intrinsics.inc.h: ${LLVM_SRCS}/include/llvm/Intrinsics.td
${TBLGEN} -I ${LLVM_SRCS}/lib/VMCore ${TBLINC} -gen-intrinsic \
@@ -110,6 +114,10 @@ AttrTemplateInstantiate.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td
-gen-clang-attr-template-instantiate -o ${.TARGET} \
-I ${CLANG_SRCS}/include ${.ALLSRC}
+CommentNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/CommentNodes.td
+ ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include/clang/AST ${TBLINC} \
+ -gen-clang-comment-nodes -o ${.TARGET} ${.ALLSRC}
+
DeclNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/DeclNodes.td
${CLANG_TBLGEN} -I ${CLANG_SRCS}/include/clang/AST ${TBLINC} \
-gen-clang-decl-nodes -o ${.TARGET} ${.ALLSRC}
@@ -130,7 +138,7 @@ DiagnosticIndexName.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td
${CLANG_TBLGEN} -I ${CLANG_SRCS}/include/clang/Basic ${TBLINC} \
-gen-clang-diags-index-name -o ${.TARGET} ${.ALLSRC}
-.for hdr in AST Analysis Common Driver Frontend Lex Parse Sema Serialization
+.for hdr in AST Analysis Comment Common Driver Frontend Lex Parse Sema Serialization
Diagnostic${hdr}Kinds.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td
${CLANG_TBLGEN} -I ${CLANG_SRCS}/include/clang/Basic ${TBLINC} \
-gen-clang-diags-defs -clang-component=${hdr} \
@@ -141,10 +149,6 @@ Options.inc.h: ${CLANG_SRCS}/include/clang/Driver/Options.td
${CLANG_TBLGEN} -I ${CLANG_SRCS}/include/clang/Driver ${TBLINC} \
-gen-opt-parser-defs -o ${.TARGET} ${.ALLSRC}
-CC1Options.inc.h: ${CLANG_SRCS}/include/clang/Driver/CC1Options.td
- ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include/clang/Driver ${TBLINC} \
- -gen-opt-parser-defs -o ${.TARGET} ${.ALLSRC}
-
CC1AsOptions.inc.h: ${CLANG_SRCS}/include/clang/Driver/CC1AsOptions.td
${CLANG_TBLGEN} -I ${CLANG_SRCS}/include/clang/Driver ${TBLINC} \
-gen-opt-parser-defs -o ${.TARGET} ${.ALLSRC}
diff --git a/lib/clang/clang.lib.mk b/lib/clang/clang.lib.mk
index f7bd281..13afa85 100644
--- a/lib/clang/clang.lib.mk
+++ b/lib/clang/clang.lib.mk
@@ -1,6 +1,6 @@
# $FreeBSD$
-LLVM_SRCS=${.CURDIR}/../../../contrib/llvm
+LLVM_SRCS= ${.CURDIR}/../../../contrib/llvm
.include "clang.build.mk"
diff --git a/lib/clang/include/Makefile b/lib/clang/include/Makefile
index 05b43cf..93d91c7 100644
--- a/lib/clang/include/Makefile
+++ b/lib/clang/include/Makefile
@@ -2,9 +2,10 @@
.PATH: ${.CURDIR}/../../../contrib/llvm/tools/clang/lib/Headers
-INCSDIR=${INCLUDEDIR}/clang/3.1
+INCSDIR=${INCLUDEDIR}/clang/3.2
INCS= altivec.h \
+ ammintrin.h \
avx2intrin.h \
avxintrin.h \
bmi2intrin.h \
@@ -12,6 +13,7 @@ INCS= altivec.h \
cpuid.h \
emmintrin.h \
fma4intrin.h \
+ fmaintrin.h \
immintrin.h \
lzcntintrin.h \
mm3dnow.h \
@@ -23,11 +25,9 @@ INCS= altivec.h \
popcntintrin.h \
smmintrin.h \
tmmintrin.h \
- unwind.h \
wmmintrin.h \
x86intrin.h \
- xmmintrin.h
+ xmmintrin.h \
+ xopintrin.h
-.include <bsd.init.mk>
-.include <bsd.incs.mk>
-.include <bsd.obj.mk>
+.include <bsd.prog.mk>
diff --git a/lib/clang/include/Makefile.depend b/lib/clang/include/Makefile.depend
new file mode 100644
index 0000000..29fda55
--- /dev/null
+++ b/lib/clang/include/Makefile.depend
@@ -0,0 +1,14 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/include/MipsGenDisassemblerTables.inc b/lib/clang/include/MipsGenDisassemblerTables.inc
new file mode 100644
index 0000000..1308e33
--- /dev/null
+++ b/lib/clang/include/MipsGenDisassemblerTables.inc
@@ -0,0 +1,2 @@
+/* $FreeBSD$ */
+#include "MipsGenDisassemblerTables.inc.h"
diff --git a/lib/clang/include/MipsGenEDInfo.inc b/lib/clang/include/MipsGenEDInfo.inc
new file mode 100644
index 0000000..5b8099f
--- /dev/null
+++ b/lib/clang/include/MipsGenEDInfo.inc
@@ -0,0 +1,2 @@
+/* $FreeBSD$ */
+#include "MipsGenEDInfo.inc.h"
diff --git a/lib/clang/include/clang/AST/CommentNodes.inc b/lib/clang/include/clang/AST/CommentNodes.inc
new file mode 100644
index 0000000..1da6147
--- /dev/null
+++ b/lib/clang/include/clang/AST/CommentNodes.inc
@@ -0,0 +1,2 @@
+/* $FreeBSD$ */
+#include "CommentNodes.inc.h"
diff --git a/lib/clang/include/clang/Basic/DiagnosticCommentKinds.inc b/lib/clang/include/clang/Basic/DiagnosticCommentKinds.inc
new file mode 100644
index 0000000..518c3b7
--- /dev/null
+++ b/lib/clang/include/clang/Basic/DiagnosticCommentKinds.inc
@@ -0,0 +1,2 @@
+/* $FreeBSD$ */
+#include "DiagnosticCommentKinds.inc.h"
diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc
index b263857..d04836e 100644
--- a/lib/clang/include/clang/Basic/Version.inc
+++ b/lib/clang/include/clang/Basic/Version.inc
@@ -1,10 +1,10 @@
/* $FreeBSD$ */
-#define CLANG_VERSION 3.1
+#define CLANG_VERSION 3.2
#define CLANG_VERSION_MAJOR 3
-#define CLANG_VERSION_MINOR 1
+#define CLANG_VERSION_MINOR 2
#define CLANG_VENDOR "FreeBSD "
-#define CLANG_VENDOR_SUFFIX " 20120523"
+#define CLANG_VENDOR_SUFFIX " 20120817"
-#define SVN_REVISION "156863"
+#define SVN_REVISION "162107"
diff --git a/lib/clang/include/clang/Driver/CC1Options.inc b/lib/clang/include/clang/Driver/CC1Options.inc
deleted file mode 100644
index 33029a0..0000000
--- a/lib/clang/include/clang/Driver/CC1Options.inc
+++ /dev/null
@@ -1,2 +0,0 @@
-/* $FreeBSD$ */
-#include "CC1Options.inc.h"
diff --git a/lib/clang/include/llvm/Config/AsmParsers.def b/lib/clang/include/llvm/Config/AsmParsers.def
index 0fdc4ff..024462e 100644
--- a/lib/clang/include/llvm/Config/AsmParsers.def
+++ b/lib/clang/include/llvm/Config/AsmParsers.def
@@ -1,6 +1,7 @@
/* $FreeBSD$ */
LLVM_ASM_PARSER(ARM)
+LLVM_ASM_PARSER(Mips)
LLVM_ASM_PARSER(X86)
#undef LLVM_ASM_PARSER
diff --git a/lib/clang/include/llvm/Config/Disassemblers.def b/lib/clang/include/llvm/Config/Disassemblers.def
index 3a65fa4..1b26531 100644
--- a/lib/clang/include/llvm/Config/Disassemblers.def
+++ b/lib/clang/include/llvm/Config/Disassemblers.def
@@ -1,6 +1,7 @@
/* $FreeBSD$ */
LLVM_DISASSEMBLER(ARM)
+LLVM_DISASSEMBLER(Mips)
LLVM_DISASSEMBLER(X86)
#undef LLVM_DISASSEMBLER
diff --git a/lib/clang/include/llvm/Config/config.h b/lib/clang/include/llvm/Config/config.h
index 90bee6e..15d7e2d 100644
--- a/lib/clang/include/llvm/Config/config.h
+++ b/lib/clang/include/llvm/Config/config.h
@@ -20,12 +20,15 @@
/* Define if position independent code is enabled */
#define ENABLE_PIC 0
-/* Define if timestamp information (e.g., __DATE___) is allowed */
+/* Define if timestamp information (e.g., __DATE__) is allowed */
#define ENABLE_TIMESTAMPS 0
/* Directory where gcc is installed. */
#define GCC_INSTALL_PREFIX ""
+/* Define to 1 if you have the `arc4random' function. */
+#define HAVE_ARC4RANDOM 1
+
/* Define to 1 if you have the `argz_append' function. */
/* #undef HAVE_ARGZ_APPEND */
@@ -551,6 +554,9 @@
/* Has gcc/MSVC atomic intrinsics */
#define LLVM_HAS_ATOMICS 0
+/* Host triple LLVM will be executed on */
+/* #undef LLVM_HOSTTRIPLE */
+
/* Installation directory for include files */
/* #undef LLVM_INCLUDEDIR */
@@ -630,7 +636,7 @@
#define LLVM_VERSION_MAJOR 3
/* Minor version of the LLVM API */
-#define LLVM_VERSION_MINOR 1
+#define LLVM_VERSION_MINOR 2
/* Define if the OS needs help to load dependent libraries for dlopen(). */
#define LTDL_DLOPEN_DEPLIBS 1
@@ -663,13 +669,13 @@
#define PACKAGE_NAME "LLVM"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "LLVM 3.1"
+#define PACKAGE_STRING "LLVM 3.2svn"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "llvm"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "3.1"
+#define PACKAGE_VERSION "3.2svn"
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
diff --git a/lib/clang/include/llvm/Config/llvm-config.h b/lib/clang/include/llvm/Config/llvm-config.h
index 4a8d460..ff4355c 100644
--- a/lib/clang/include/llvm/Config/llvm-config.h
+++ b/lib/clang/include/llvm/Config/llvm-config.h
@@ -42,6 +42,9 @@
/* Has gcc/MSVC atomic intrinsics */
#define LLVM_HAS_ATOMICS 0
+/* Host triple LLVM will be executed on */
+/* #undef LLVM_HOSTTRIPLE */
+
/* Installation directory for include files */
/* #undef LLVM_INCLUDEDIR */
@@ -115,6 +118,6 @@
#define LLVM_VERSION_MAJOR 3
/* Minor version of the LLVM API */
-#define LLVM_VERSION_MINOR 1
+#define LLVM_VERSION_MINOR 2
#endif
diff --git a/lib/clang/libclanganalysis/Makefile b/lib/clang/libclanganalysis/Makefile
index f45ec59..d96f5dc 100644
--- a/lib/clang/libclanganalysis/Makefile
+++ b/lib/clang/libclanganalysis/Makefile
@@ -23,6 +23,7 @@ SRCS= AnalysisDeclContext.cpp \
TGHDRS= AttrList \
Attrs \
+ CommentNodes \
DeclNodes \
DiagnosticAnalysisKinds \
DiagnosticCommonKinds \
diff --git a/lib/clang/libclanganalysis/Makefile.depend b/lib/clang/libclanganalysis/Makefile.depend
new file mode 100644
index 0000000..372e3ca
--- /dev/null
+++ b/lib/clang/libclanganalysis/Makefile.depend
@@ -0,0 +1,179 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+AnalysisDeclContext.o: AttrList.inc.h
+AnalysisDeclContext.o: Attrs.inc.h
+AnalysisDeclContext.o: DeclNodes.inc.h
+AnalysisDeclContext.o: DiagnosticCommonKinds.inc.h
+AnalysisDeclContext.o: StmtNodes.inc.h
+AnalysisDeclContext.po: AttrList.inc.h
+AnalysisDeclContext.po: Attrs.inc.h
+AnalysisDeclContext.po: DeclNodes.inc.h
+AnalysisDeclContext.po: DiagnosticCommonKinds.inc.h
+AnalysisDeclContext.po: StmtNodes.inc.h
+CFG.o: AttrList.inc.h
+CFG.o: Attrs.inc.h
+CFG.o: DeclNodes.inc.h
+CFG.o: DiagnosticCommonKinds.inc.h
+CFG.o: StmtNodes.inc.h
+CFG.po: AttrList.inc.h
+CFG.po: Attrs.inc.h
+CFG.po: DeclNodes.inc.h
+CFG.po: DiagnosticCommonKinds.inc.h
+CFG.po: StmtNodes.inc.h
+CFGReachabilityAnalysis.o: AttrList.inc.h
+CFGReachabilityAnalysis.o: Attrs.inc.h
+CFGReachabilityAnalysis.o: DeclNodes.inc.h
+CFGReachabilityAnalysis.o: DiagnosticCommonKinds.inc.h
+CFGReachabilityAnalysis.o: StmtNodes.inc.h
+CFGReachabilityAnalysis.po: AttrList.inc.h
+CFGReachabilityAnalysis.po: Attrs.inc.h
+CFGReachabilityAnalysis.po: DeclNodes.inc.h
+CFGReachabilityAnalysis.po: DiagnosticCommonKinds.inc.h
+CFGReachabilityAnalysis.po: StmtNodes.inc.h
+CFGStmtMap.o: AttrList.inc.h
+CFGStmtMap.o: Attrs.inc.h
+CFGStmtMap.o: DeclNodes.inc.h
+CFGStmtMap.o: DiagnosticCommonKinds.inc.h
+CFGStmtMap.o: StmtNodes.inc.h
+CFGStmtMap.po: AttrList.inc.h
+CFGStmtMap.po: Attrs.inc.h
+CFGStmtMap.po: DeclNodes.inc.h
+CFGStmtMap.po: DiagnosticCommonKinds.inc.h
+CFGStmtMap.po: StmtNodes.inc.h
+CallGraph.o: AttrList.inc.h
+CallGraph.o: Attrs.inc.h
+CallGraph.o: DeclNodes.inc.h
+CallGraph.o: DiagnosticCommonKinds.inc.h
+CallGraph.o: StmtNodes.inc.h
+CallGraph.po: AttrList.inc.h
+CallGraph.po: Attrs.inc.h
+CallGraph.po: DeclNodes.inc.h
+CallGraph.po: DiagnosticCommonKinds.inc.h
+CallGraph.po: StmtNodes.inc.h
+CocoaConventions.o: AttrList.inc.h
+CocoaConventions.o: Attrs.inc.h
+CocoaConventions.o: DeclNodes.inc.h
+CocoaConventions.o: DiagnosticCommonKinds.inc.h
+CocoaConventions.po: AttrList.inc.h
+CocoaConventions.po: Attrs.inc.h
+CocoaConventions.po: DeclNodes.inc.h
+CocoaConventions.po: DiagnosticCommonKinds.inc.h
+Dominators.o: AttrList.inc.h
+Dominators.o: Attrs.inc.h
+Dominators.o: DeclNodes.inc.h
+Dominators.o: DiagnosticCommonKinds.inc.h
+Dominators.o: StmtNodes.inc.h
+Dominators.po: AttrList.inc.h
+Dominators.po: Attrs.inc.h
+Dominators.po: DeclNodes.inc.h
+Dominators.po: DiagnosticCommonKinds.inc.h
+Dominators.po: StmtNodes.inc.h
+FormatString.o: AttrList.inc.h
+FormatString.o: Attrs.inc.h
+FormatString.o: DeclNodes.inc.h
+FormatString.o: DiagnosticCommonKinds.inc.h
+FormatString.po: AttrList.inc.h
+FormatString.po: Attrs.inc.h
+FormatString.po: DeclNodes.inc.h
+FormatString.po: DiagnosticCommonKinds.inc.h
+LiveVariables.o: AttrList.inc.h
+LiveVariables.o: Attrs.inc.h
+LiveVariables.o: DeclNodes.inc.h
+LiveVariables.o: DiagnosticCommonKinds.inc.h
+LiveVariables.o: StmtNodes.inc.h
+LiveVariables.po: AttrList.inc.h
+LiveVariables.po: Attrs.inc.h
+LiveVariables.po: DeclNodes.inc.h
+LiveVariables.po: DiagnosticCommonKinds.inc.h
+LiveVariables.po: StmtNodes.inc.h
+PostOrderCFGView.o: AttrList.inc.h
+PostOrderCFGView.o: Attrs.inc.h
+PostOrderCFGView.o: DeclNodes.inc.h
+PostOrderCFGView.o: DiagnosticCommonKinds.inc.h
+PostOrderCFGView.o: StmtNodes.inc.h
+PostOrderCFGView.po: AttrList.inc.h
+PostOrderCFGView.po: Attrs.inc.h
+PostOrderCFGView.po: DeclNodes.inc.h
+PostOrderCFGView.po: DiagnosticCommonKinds.inc.h
+PostOrderCFGView.po: StmtNodes.inc.h
+PrintfFormatString.o: AttrList.inc.h
+PrintfFormatString.o: Attrs.inc.h
+PrintfFormatString.o: DeclNodes.inc.h
+PrintfFormatString.o: DiagnosticCommonKinds.inc.h
+PrintfFormatString.po: AttrList.inc.h
+PrintfFormatString.po: Attrs.inc.h
+PrintfFormatString.po: DeclNodes.inc.h
+PrintfFormatString.po: DiagnosticCommonKinds.inc.h
+ProgramPoint.o: AttrList.inc.h
+ProgramPoint.o: Attrs.inc.h
+ProgramPoint.o: DeclNodes.inc.h
+ProgramPoint.o: DiagnosticCommonKinds.inc.h
+ProgramPoint.o: StmtNodes.inc.h
+ProgramPoint.po: AttrList.inc.h
+ProgramPoint.po: Attrs.inc.h
+ProgramPoint.po: DeclNodes.inc.h
+ProgramPoint.po: DiagnosticCommonKinds.inc.h
+ProgramPoint.po: StmtNodes.inc.h
+PseudoConstantAnalysis.o: AttrList.inc.h
+PseudoConstantAnalysis.o: Attrs.inc.h
+PseudoConstantAnalysis.o: DeclNodes.inc.h
+PseudoConstantAnalysis.o: DiagnosticCommonKinds.inc.h
+PseudoConstantAnalysis.o: StmtNodes.inc.h
+PseudoConstantAnalysis.po: AttrList.inc.h
+PseudoConstantAnalysis.po: Attrs.inc.h
+PseudoConstantAnalysis.po: DeclNodes.inc.h
+PseudoConstantAnalysis.po: DiagnosticCommonKinds.inc.h
+PseudoConstantAnalysis.po: StmtNodes.inc.h
+ReachableCode.o: AttrList.inc.h
+ReachableCode.o: Attrs.inc.h
+ReachableCode.o: DeclNodes.inc.h
+ReachableCode.o: DiagnosticCommonKinds.inc.h
+ReachableCode.o: StmtNodes.inc.h
+ReachableCode.po: AttrList.inc.h
+ReachableCode.po: Attrs.inc.h
+ReachableCode.po: DeclNodes.inc.h
+ReachableCode.po: DiagnosticCommonKinds.inc.h
+ReachableCode.po: StmtNodes.inc.h
+ScanfFormatString.o: AttrList.inc.h
+ScanfFormatString.o: Attrs.inc.h
+ScanfFormatString.o: DeclNodes.inc.h
+ScanfFormatString.o: DiagnosticCommonKinds.inc.h
+ScanfFormatString.po: AttrList.inc.h
+ScanfFormatString.po: Attrs.inc.h
+ScanfFormatString.po: DeclNodes.inc.h
+ScanfFormatString.po: DiagnosticCommonKinds.inc.h
+ThreadSafety.o: AttrList.inc.h
+ThreadSafety.o: Attrs.inc.h
+ThreadSafety.o: DeclNodes.inc.h
+ThreadSafety.o: DiagnosticCommonKinds.inc.h
+ThreadSafety.o: StmtNodes.inc.h
+ThreadSafety.po: AttrList.inc.h
+ThreadSafety.po: Attrs.inc.h
+ThreadSafety.po: DeclNodes.inc.h
+ThreadSafety.po: DiagnosticCommonKinds.inc.h
+ThreadSafety.po: StmtNodes.inc.h
+UninitializedValues.o: AttrList.inc.h
+UninitializedValues.o: Attrs.inc.h
+UninitializedValues.o: DeclNodes.inc.h
+UninitializedValues.o: DiagnosticCommonKinds.inc.h
+UninitializedValues.o: StmtNodes.inc.h
+UninitializedValues.po: AttrList.inc.h
+UninitializedValues.po: Attrs.inc.h
+UninitializedValues.po: DeclNodes.inc.h
+UninitializedValues.po: DiagnosticCommonKinds.inc.h
+UninitializedValues.po: StmtNodes.inc.h
+.endif
diff --git a/lib/clang/libclangarcmigrate/Makefile b/lib/clang/libclangarcmigrate/Makefile
index d097ec4..6544805 100644
--- a/lib/clang/libclangarcmigrate/Makefile
+++ b/lib/clang/libclangarcmigrate/Makefile
@@ -26,6 +26,7 @@ SRCS= ARCMT.cpp \
TGHDRS= AttrList \
AttrParsedAttrList \
Attrs \
+ CommentNodes \
DeclNodes \
DiagnosticCommonKinds \
DiagnosticGroups \
diff --git a/lib/clang/libclangarcmigrate/Makefile.depend b/lib/clang/libclangarcmigrate/Makefile.depend
new file mode 100644
index 0000000..ba37a31c
--- /dev/null
+++ b/lib/clang/libclangarcmigrate/Makefile.depend
@@ -0,0 +1,209 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+ARCMT.o: AttrList.inc.h
+ARCMT.o: AttrParsedAttrList.inc.h
+ARCMT.o: Attrs.inc.h
+ARCMT.o: DeclNodes.inc.h
+ARCMT.o: DiagnosticCommonKinds.inc.h
+ARCMT.o: DiagnosticGroups.inc.h
+ARCMT.o: DiagnosticSemaKinds.inc.h
+ARCMT.o: StmtNodes.inc.h
+ARCMT.po: AttrList.inc.h
+ARCMT.po: AttrParsedAttrList.inc.h
+ARCMT.po: Attrs.inc.h
+ARCMT.po: DeclNodes.inc.h
+ARCMT.po: DiagnosticCommonKinds.inc.h
+ARCMT.po: DiagnosticGroups.inc.h
+ARCMT.po: DiagnosticSemaKinds.inc.h
+ARCMT.po: StmtNodes.inc.h
+ARCMTActions.o: DiagnosticCommonKinds.inc.h
+ARCMTActions.po: DiagnosticCommonKinds.inc.h
+FileRemapper.o: DiagnosticCommonKinds.inc.h
+FileRemapper.po: DiagnosticCommonKinds.inc.h
+ObjCMT.o: AttrList.inc.h
+ObjCMT.o: Attrs.inc.h
+ObjCMT.o: DeclNodes.inc.h
+ObjCMT.o: DiagnosticCommonKinds.inc.h
+ObjCMT.o: StmtNodes.inc.h
+ObjCMT.po: AttrList.inc.h
+ObjCMT.po: Attrs.inc.h
+ObjCMT.po: DeclNodes.inc.h
+ObjCMT.po: DiagnosticCommonKinds.inc.h
+ObjCMT.po: StmtNodes.inc.h
+PlistReporter.o: DiagnosticCommonKinds.inc.h
+PlistReporter.po: DiagnosticCommonKinds.inc.h
+TransAPIUses.o: AttrList.inc.h
+TransAPIUses.o: Attrs.inc.h
+TransAPIUses.o: DeclNodes.inc.h
+TransAPIUses.o: DiagnosticCommonKinds.inc.h
+TransAPIUses.o: DiagnosticSemaKinds.inc.h
+TransAPIUses.o: StmtNodes.inc.h
+TransAPIUses.po: AttrList.inc.h
+TransAPIUses.po: Attrs.inc.h
+TransAPIUses.po: DeclNodes.inc.h
+TransAPIUses.po: DiagnosticCommonKinds.inc.h
+TransAPIUses.po: DiagnosticSemaKinds.inc.h
+TransAPIUses.po: StmtNodes.inc.h
+TransARCAssign.o: AttrList.inc.h
+TransARCAssign.o: Attrs.inc.h
+TransARCAssign.o: DeclNodes.inc.h
+TransARCAssign.o: DiagnosticCommonKinds.inc.h
+TransARCAssign.o: DiagnosticSemaKinds.inc.h
+TransARCAssign.o: StmtNodes.inc.h
+TransARCAssign.po: AttrList.inc.h
+TransARCAssign.po: Attrs.inc.h
+TransARCAssign.po: DeclNodes.inc.h
+TransARCAssign.po: DiagnosticCommonKinds.inc.h
+TransARCAssign.po: DiagnosticSemaKinds.inc.h
+TransARCAssign.po: StmtNodes.inc.h
+TransAutoreleasePool.o: AttrList.inc.h
+TransAutoreleasePool.o: Attrs.inc.h
+TransAutoreleasePool.o: DeclNodes.inc.h
+TransAutoreleasePool.o: DiagnosticCommonKinds.inc.h
+TransAutoreleasePool.o: DiagnosticSemaKinds.inc.h
+TransAutoreleasePool.o: StmtNodes.inc.h
+TransAutoreleasePool.po: AttrList.inc.h
+TransAutoreleasePool.po: Attrs.inc.h
+TransAutoreleasePool.po: DeclNodes.inc.h
+TransAutoreleasePool.po: DiagnosticCommonKinds.inc.h
+TransAutoreleasePool.po: DiagnosticSemaKinds.inc.h
+TransAutoreleasePool.po: StmtNodes.inc.h
+TransBlockObjCVariable.o: AttrList.inc.h
+TransBlockObjCVariable.o: Attrs.inc.h
+TransBlockObjCVariable.o: DeclNodes.inc.h
+TransBlockObjCVariable.o: DiagnosticCommonKinds.inc.h
+TransBlockObjCVariable.o: StmtNodes.inc.h
+TransBlockObjCVariable.po: AttrList.inc.h
+TransBlockObjCVariable.po: Attrs.inc.h
+TransBlockObjCVariable.po: DeclNodes.inc.h
+TransBlockObjCVariable.po: DiagnosticCommonKinds.inc.h
+TransBlockObjCVariable.po: StmtNodes.inc.h
+TransEmptyStatementsAndDealloc.o: AttrList.inc.h
+TransEmptyStatementsAndDealloc.o: Attrs.inc.h
+TransEmptyStatementsAndDealloc.o: DeclNodes.inc.h
+TransEmptyStatementsAndDealloc.o: DiagnosticCommonKinds.inc.h
+TransEmptyStatementsAndDealloc.o: StmtNodes.inc.h
+TransEmptyStatementsAndDealloc.po: AttrList.inc.h
+TransEmptyStatementsAndDealloc.po: Attrs.inc.h
+TransEmptyStatementsAndDealloc.po: DeclNodes.inc.h
+TransEmptyStatementsAndDealloc.po: DiagnosticCommonKinds.inc.h
+TransEmptyStatementsAndDealloc.po: StmtNodes.inc.h
+TransGCAttrs.o: AttrList.inc.h
+TransGCAttrs.o: Attrs.inc.h
+TransGCAttrs.o: DeclNodes.inc.h
+TransGCAttrs.o: DiagnosticCommonKinds.inc.h
+TransGCAttrs.o: DiagnosticSemaKinds.inc.h
+TransGCAttrs.o: StmtNodes.inc.h
+TransGCAttrs.po: AttrList.inc.h
+TransGCAttrs.po: Attrs.inc.h
+TransGCAttrs.po: DeclNodes.inc.h
+TransGCAttrs.po: DiagnosticCommonKinds.inc.h
+TransGCAttrs.po: DiagnosticSemaKinds.inc.h
+TransGCAttrs.po: StmtNodes.inc.h
+TransGCCalls.o: AttrList.inc.h
+TransGCCalls.o: Attrs.inc.h
+TransGCCalls.o: DeclNodes.inc.h
+TransGCCalls.o: DiagnosticCommonKinds.inc.h
+TransGCCalls.o: DiagnosticSemaKinds.inc.h
+TransGCCalls.o: StmtNodes.inc.h
+TransGCCalls.po: AttrList.inc.h
+TransGCCalls.po: Attrs.inc.h
+TransGCCalls.po: DeclNodes.inc.h
+TransGCCalls.po: DiagnosticCommonKinds.inc.h
+TransGCCalls.po: DiagnosticSemaKinds.inc.h
+TransGCCalls.po: StmtNodes.inc.h
+TransProperties.o: AttrList.inc.h
+TransProperties.o: Attrs.inc.h
+TransProperties.o: DeclNodes.inc.h
+TransProperties.o: DiagnosticCommonKinds.inc.h
+TransProperties.o: DiagnosticSemaKinds.inc.h
+TransProperties.o: StmtNodes.inc.h
+TransProperties.po: AttrList.inc.h
+TransProperties.po: Attrs.inc.h
+TransProperties.po: DeclNodes.inc.h
+TransProperties.po: DiagnosticCommonKinds.inc.h
+TransProperties.po: DiagnosticSemaKinds.inc.h
+TransProperties.po: StmtNodes.inc.h
+TransRetainReleaseDealloc.o: AttrList.inc.h
+TransRetainReleaseDealloc.o: Attrs.inc.h
+TransRetainReleaseDealloc.o: DeclNodes.inc.h
+TransRetainReleaseDealloc.o: DiagnosticCommonKinds.inc.h
+TransRetainReleaseDealloc.o: DiagnosticSemaKinds.inc.h
+TransRetainReleaseDealloc.o: StmtNodes.inc.h
+TransRetainReleaseDealloc.po: AttrList.inc.h
+TransRetainReleaseDealloc.po: Attrs.inc.h
+TransRetainReleaseDealloc.po: DeclNodes.inc.h
+TransRetainReleaseDealloc.po: DiagnosticCommonKinds.inc.h
+TransRetainReleaseDealloc.po: DiagnosticSemaKinds.inc.h
+TransRetainReleaseDealloc.po: StmtNodes.inc.h
+TransUnbridgedCasts.o: AttrList.inc.h
+TransUnbridgedCasts.o: Attrs.inc.h
+TransUnbridgedCasts.o: DeclNodes.inc.h
+TransUnbridgedCasts.o: DiagnosticCommonKinds.inc.h
+TransUnbridgedCasts.o: DiagnosticSemaKinds.inc.h
+TransUnbridgedCasts.o: StmtNodes.inc.h
+TransUnbridgedCasts.po: AttrList.inc.h
+TransUnbridgedCasts.po: Attrs.inc.h
+TransUnbridgedCasts.po: DeclNodes.inc.h
+TransUnbridgedCasts.po: DiagnosticCommonKinds.inc.h
+TransUnbridgedCasts.po: DiagnosticSemaKinds.inc.h
+TransUnbridgedCasts.po: StmtNodes.inc.h
+TransUnusedInitDelegate.o: AttrList.inc.h
+TransUnusedInitDelegate.o: Attrs.inc.h
+TransUnusedInitDelegate.o: DeclNodes.inc.h
+TransUnusedInitDelegate.o: DiagnosticCommonKinds.inc.h
+TransUnusedInitDelegate.o: DiagnosticSemaKinds.inc.h
+TransUnusedInitDelegate.o: StmtNodes.inc.h
+TransUnusedInitDelegate.po: AttrList.inc.h
+TransUnusedInitDelegate.po: Attrs.inc.h
+TransUnusedInitDelegate.po: DeclNodes.inc.h
+TransUnusedInitDelegate.po: DiagnosticCommonKinds.inc.h
+TransUnusedInitDelegate.po: DiagnosticSemaKinds.inc.h
+TransUnusedInitDelegate.po: StmtNodes.inc.h
+TransZeroOutPropsInDealloc.o: AttrList.inc.h
+TransZeroOutPropsInDealloc.o: Attrs.inc.h
+TransZeroOutPropsInDealloc.o: DeclNodes.inc.h
+TransZeroOutPropsInDealloc.o: DiagnosticCommonKinds.inc.h
+TransZeroOutPropsInDealloc.o: StmtNodes.inc.h
+TransZeroOutPropsInDealloc.po: AttrList.inc.h
+TransZeroOutPropsInDealloc.po: Attrs.inc.h
+TransZeroOutPropsInDealloc.po: DeclNodes.inc.h
+TransZeroOutPropsInDealloc.po: DiagnosticCommonKinds.inc.h
+TransZeroOutPropsInDealloc.po: StmtNodes.inc.h
+TransformActions.o: AttrList.inc.h
+TransformActions.o: Attrs.inc.h
+TransformActions.o: DeclNodes.inc.h
+TransformActions.o: DiagnosticCommonKinds.inc.h
+TransformActions.o: StmtNodes.inc.h
+TransformActions.po: AttrList.inc.h
+TransformActions.po: Attrs.inc.h
+TransformActions.po: DeclNodes.inc.h
+TransformActions.po: DiagnosticCommonKinds.inc.h
+TransformActions.po: StmtNodes.inc.h
+Transforms.o: AttrList.inc.h
+Transforms.o: Attrs.inc.h
+Transforms.o: DeclNodes.inc.h
+Transforms.o: DiagnosticCommonKinds.inc.h
+Transforms.o: DiagnosticSemaKinds.inc.h
+Transforms.o: StmtNodes.inc.h
+Transforms.po: AttrList.inc.h
+Transforms.po: Attrs.inc.h
+Transforms.po: DeclNodes.inc.h
+Transforms.po: DiagnosticCommonKinds.inc.h
+Transforms.po: DiagnosticSemaKinds.inc.h
+Transforms.po: StmtNodes.inc.h
+.endif
diff --git a/lib/clang/libclangast/Makefile b/lib/clang/libclangast/Makefile
index 81812dc..a80bc7e 100644
--- a/lib/clang/libclangast/Makefile
+++ b/lib/clang/libclangast/Makefile
@@ -10,6 +10,13 @@ SRCS= APValue.cpp \
ASTImporter.cpp \
AttrImpl.cpp \
CXXInheritance.cpp \
+ Comment.cpp \
+ CommentBriefParser.cpp \
+ CommentCommandTraits.cpp \
+ CommentDumper.cpp \
+ CommentLexer.cpp \
+ CommentParser.cpp \
+ CommentSema.cpp \
Decl.cpp \
DeclBase.cpp \
DeclCXX.cpp \
@@ -35,6 +42,7 @@ SRCS= APValue.cpp \
NestedNameSpecifier.cpp \
NSAPI.cpp \
ParentMap.cpp \
+ RawCommentList.cpp \
RecordLayout.cpp \
RecordLayoutBuilder.cpp \
SelectorLocationsKind.cpp \
@@ -55,8 +63,10 @@ SRCS= APValue.cpp \
TGHDRS= AttrImpl \
AttrList \
Attrs \
+ CommentNodes \
DeclNodes \
DiagnosticASTKinds \
+ DiagnosticCommentKinds \
DiagnosticCommonKinds \
DiagnosticSemaKinds \
StmtNodes
diff --git a/lib/clang/libclangast/Makefile.depend b/lib/clang/libclangast/Makefile.depend
new file mode 100644
index 0000000..b15ee05
--- /dev/null
+++ b/lib/clang/libclangast/Makefile.depend
@@ -0,0 +1,489 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+APValue.o: AttrList.inc.h
+APValue.o: Attrs.inc.h
+APValue.o: DeclNodes.inc.h
+APValue.o: DiagnosticCommonKinds.inc.h
+APValue.o: StmtNodes.inc.h
+APValue.po: AttrList.inc.h
+APValue.po: Attrs.inc.h
+APValue.po: DeclNodes.inc.h
+APValue.po: DiagnosticCommonKinds.inc.h
+APValue.po: StmtNodes.inc.h
+ASTContext.o: AttrList.inc.h
+ASTContext.o: Attrs.inc.h
+ASTContext.o: DeclNodes.inc.h
+ASTContext.o: DiagnosticCommonKinds.inc.h
+ASTContext.o: StmtNodes.inc.h
+ASTContext.po: AttrList.inc.h
+ASTContext.po: Attrs.inc.h
+ASTContext.po: DeclNodes.inc.h
+ASTContext.po: DiagnosticCommonKinds.inc.h
+ASTContext.po: StmtNodes.inc.h
+ASTDiagnostic.o: AttrList.inc.h
+ASTDiagnostic.o: Attrs.inc.h
+ASTDiagnostic.o: DeclNodes.inc.h
+ASTDiagnostic.o: DiagnosticASTKinds.inc.h
+ASTDiagnostic.o: DiagnosticCommonKinds.inc.h
+ASTDiagnostic.po: AttrList.inc.h
+ASTDiagnostic.po: Attrs.inc.h
+ASTDiagnostic.po: DeclNodes.inc.h
+ASTDiagnostic.po: DiagnosticASTKinds.inc.h
+ASTDiagnostic.po: DiagnosticCommonKinds.inc.h
+ASTImporter.o: AttrList.inc.h
+ASTImporter.o: Attrs.inc.h
+ASTImporter.o: DeclNodes.inc.h
+ASTImporter.o: DiagnosticASTKinds.inc.h
+ASTImporter.o: DiagnosticCommonKinds.inc.h
+ASTImporter.o: StmtNodes.inc.h
+ASTImporter.po: AttrList.inc.h
+ASTImporter.po: Attrs.inc.h
+ASTImporter.po: DeclNodes.inc.h
+ASTImporter.po: DiagnosticASTKinds.inc.h
+ASTImporter.po: DiagnosticCommonKinds.inc.h
+ASTImporter.po: StmtNodes.inc.h
+AttrImpl.o: AttrImpl.inc.h
+AttrImpl.o: AttrList.inc.h
+AttrImpl.o: Attrs.inc.h
+AttrImpl.o: DeclNodes.inc.h
+AttrImpl.o: DiagnosticCommonKinds.inc.h
+AttrImpl.o: StmtNodes.inc.h
+AttrImpl.po: AttrImpl.inc.h
+AttrImpl.po: AttrList.inc.h
+AttrImpl.po: Attrs.inc.h
+AttrImpl.po: DeclNodes.inc.h
+AttrImpl.po: DiagnosticCommonKinds.inc.h
+AttrImpl.po: StmtNodes.inc.h
+CXXInheritance.o: AttrList.inc.h
+CXXInheritance.o: Attrs.inc.h
+CXXInheritance.o: DeclNodes.inc.h
+CXXInheritance.o: DiagnosticCommonKinds.inc.h
+CXXInheritance.o: StmtNodes.inc.h
+CXXInheritance.po: AttrList.inc.h
+CXXInheritance.po: Attrs.inc.h
+CXXInheritance.po: DeclNodes.inc.h
+CXXInheritance.po: DiagnosticCommonKinds.inc.h
+CXXInheritance.po: StmtNodes.inc.h
+Decl.o: AttrList.inc.h
+Decl.o: Attrs.inc.h
+Decl.o: DeclNodes.inc.h
+Decl.o: DiagnosticCommonKinds.inc.h
+Decl.o: StmtNodes.inc.h
+Decl.po: AttrList.inc.h
+Decl.po: Attrs.inc.h
+Decl.po: DeclNodes.inc.h
+Decl.po: DiagnosticCommonKinds.inc.h
+Decl.po: StmtNodes.inc.h
+DeclBase.o: AttrList.inc.h
+DeclBase.o: Attrs.inc.h
+DeclBase.o: DeclNodes.inc.h
+DeclBase.o: DiagnosticCommonKinds.inc.h
+DeclBase.o: StmtNodes.inc.h
+DeclBase.po: AttrList.inc.h
+DeclBase.po: Attrs.inc.h
+DeclBase.po: DeclNodes.inc.h
+DeclBase.po: DiagnosticCommonKinds.inc.h
+DeclBase.po: StmtNodes.inc.h
+DeclCXX.o: AttrList.inc.h
+DeclCXX.o: Attrs.inc.h
+DeclCXX.o: DeclNodes.inc.h
+DeclCXX.o: DiagnosticCommonKinds.inc.h
+DeclCXX.o: StmtNodes.inc.h
+DeclCXX.po: AttrList.inc.h
+DeclCXX.po: Attrs.inc.h
+DeclCXX.po: DeclNodes.inc.h
+DeclCXX.po: DiagnosticCommonKinds.inc.h
+DeclCXX.po: StmtNodes.inc.h
+DeclFriend.o: AttrList.inc.h
+DeclFriend.o: Attrs.inc.h
+DeclFriend.o: DeclNodes.inc.h
+DeclFriend.o: DiagnosticCommonKinds.inc.h
+DeclFriend.o: StmtNodes.inc.h
+DeclFriend.po: AttrList.inc.h
+DeclFriend.po: Attrs.inc.h
+DeclFriend.po: DeclNodes.inc.h
+DeclFriend.po: DiagnosticCommonKinds.inc.h
+DeclFriend.po: StmtNodes.inc.h
+DeclGroup.o: AttrList.inc.h
+DeclGroup.o: Attrs.inc.h
+DeclGroup.o: DeclNodes.inc.h
+DeclGroup.o: DiagnosticCommonKinds.inc.h
+DeclGroup.po: AttrList.inc.h
+DeclGroup.po: Attrs.inc.h
+DeclGroup.po: DeclNodes.inc.h
+DeclGroup.po: DiagnosticCommonKinds.inc.h
+DeclObjC.o: AttrList.inc.h
+DeclObjC.o: Attrs.inc.h
+DeclObjC.o: DeclNodes.inc.h
+DeclObjC.o: DiagnosticCommonKinds.inc.h
+DeclObjC.o: StmtNodes.inc.h
+DeclObjC.po: AttrList.inc.h
+DeclObjC.po: Attrs.inc.h
+DeclObjC.po: DeclNodes.inc.h
+DeclObjC.po: DiagnosticCommonKinds.inc.h
+DeclObjC.po: StmtNodes.inc.h
+DeclPrinter.o: AttrList.inc.h
+DeclPrinter.o: Attrs.inc.h
+DeclPrinter.o: DeclNodes.inc.h
+DeclPrinter.o: DiagnosticCommonKinds.inc.h
+DeclPrinter.o: StmtNodes.inc.h
+DeclPrinter.po: AttrList.inc.h
+DeclPrinter.po: Attrs.inc.h
+DeclPrinter.po: DeclNodes.inc.h
+DeclPrinter.po: DiagnosticCommonKinds.inc.h
+DeclPrinter.po: StmtNodes.inc.h
+DeclTemplate.o: AttrList.inc.h
+DeclTemplate.o: Attrs.inc.h
+DeclTemplate.o: DeclNodes.inc.h
+DeclTemplate.o: DiagnosticCommonKinds.inc.h
+DeclTemplate.o: StmtNodes.inc.h
+DeclTemplate.po: AttrList.inc.h
+DeclTemplate.po: Attrs.inc.h
+DeclTemplate.po: DeclNodes.inc.h
+DeclTemplate.po: DiagnosticCommonKinds.inc.h
+DeclTemplate.po: StmtNodes.inc.h
+DeclarationName.o: AttrList.inc.h
+DeclarationName.o: Attrs.inc.h
+DeclarationName.o: DeclNodes.inc.h
+DeclarationName.o: DiagnosticCommonKinds.inc.h
+DeclarationName.po: AttrList.inc.h
+DeclarationName.po: Attrs.inc.h
+DeclarationName.po: DeclNodes.inc.h
+DeclarationName.po: DiagnosticCommonKinds.inc.h
+DumpXML.o: AttrList.inc.h
+DumpXML.o: Attrs.inc.h
+DumpXML.o: DeclNodes.inc.h
+DumpXML.o: DiagnosticCommonKinds.inc.h
+DumpXML.o: StmtNodes.inc.h
+DumpXML.po: AttrList.inc.h
+DumpXML.po: Attrs.inc.h
+DumpXML.po: DeclNodes.inc.h
+DumpXML.po: DiagnosticCommonKinds.inc.h
+DumpXML.po: StmtNodes.inc.h
+Expr.o: AttrList.inc.h
+Expr.o: Attrs.inc.h
+Expr.o: DeclNodes.inc.h
+Expr.o: DiagnosticCommonKinds.inc.h
+Expr.o: DiagnosticSemaKinds.inc.h
+Expr.o: StmtNodes.inc.h
+Expr.po: AttrList.inc.h
+Expr.po: Attrs.inc.h
+Expr.po: DeclNodes.inc.h
+Expr.po: DiagnosticCommonKinds.inc.h
+Expr.po: DiagnosticSemaKinds.inc.h
+Expr.po: StmtNodes.inc.h
+ExprCXX.o: AttrList.inc.h
+ExprCXX.o: Attrs.inc.h
+ExprCXX.o: DeclNodes.inc.h
+ExprCXX.o: DiagnosticCommonKinds.inc.h
+ExprCXX.o: StmtNodes.inc.h
+ExprCXX.po: AttrList.inc.h
+ExprCXX.po: Attrs.inc.h
+ExprCXX.po: DeclNodes.inc.h
+ExprCXX.po: DiagnosticCommonKinds.inc.h
+ExprCXX.po: StmtNodes.inc.h
+ExprClassification.o: AttrList.inc.h
+ExprClassification.o: Attrs.inc.h
+ExprClassification.o: DeclNodes.inc.h
+ExprClassification.o: DiagnosticCommonKinds.inc.h
+ExprClassification.o: StmtNodes.inc.h
+ExprClassification.po: AttrList.inc.h
+ExprClassification.po: Attrs.inc.h
+ExprClassification.po: DeclNodes.inc.h
+ExprClassification.po: DiagnosticCommonKinds.inc.h
+ExprClassification.po: StmtNodes.inc.h
+ExprConstant.o: AttrList.inc.h
+ExprConstant.o: Attrs.inc.h
+ExprConstant.o: DeclNodes.inc.h
+ExprConstant.o: DiagnosticASTKinds.inc.h
+ExprConstant.o: DiagnosticCommonKinds.inc.h
+ExprConstant.o: StmtNodes.inc.h
+ExprConstant.po: AttrList.inc.h
+ExprConstant.po: Attrs.inc.h
+ExprConstant.po: DeclNodes.inc.h
+ExprConstant.po: DiagnosticASTKinds.inc.h
+ExprConstant.po: DiagnosticCommonKinds.inc.h
+ExprConstant.po: StmtNodes.inc.h
+ExternalASTSource.o: AttrList.inc.h
+ExternalASTSource.o: Attrs.inc.h
+ExternalASTSource.o: DeclNodes.inc.h
+ExternalASTSource.o: DiagnosticCommonKinds.inc.h
+ExternalASTSource.po: AttrList.inc.h
+ExternalASTSource.po: Attrs.inc.h
+ExternalASTSource.po: DeclNodes.inc.h
+ExternalASTSource.po: DiagnosticCommonKinds.inc.h
+InheritViz.o: AttrList.inc.h
+InheritViz.o: Attrs.inc.h
+InheritViz.o: DeclNodes.inc.h
+InheritViz.o: DiagnosticCommonKinds.inc.h
+InheritViz.o: StmtNodes.inc.h
+InheritViz.po: AttrList.inc.h
+InheritViz.po: Attrs.inc.h
+InheritViz.po: DeclNodes.inc.h
+InheritViz.po: DiagnosticCommonKinds.inc.h
+InheritViz.po: StmtNodes.inc.h
+ItaniumCXXABI.o: AttrList.inc.h
+ItaniumCXXABI.o: Attrs.inc.h
+ItaniumCXXABI.o: DeclNodes.inc.h
+ItaniumCXXABI.o: DiagnosticCommonKinds.inc.h
+ItaniumCXXABI.o: StmtNodes.inc.h
+ItaniumCXXABI.po: AttrList.inc.h
+ItaniumCXXABI.po: Attrs.inc.h
+ItaniumCXXABI.po: DeclNodes.inc.h
+ItaniumCXXABI.po: DiagnosticCommonKinds.inc.h
+ItaniumCXXABI.po: StmtNodes.inc.h
+ItaniumMangle.o: AttrList.inc.h
+ItaniumMangle.o: Attrs.inc.h
+ItaniumMangle.o: DeclNodes.inc.h
+ItaniumMangle.o: DiagnosticCommonKinds.inc.h
+ItaniumMangle.o: StmtNodes.inc.h
+ItaniumMangle.po: AttrList.inc.h
+ItaniumMangle.po: Attrs.inc.h
+ItaniumMangle.po: DeclNodes.inc.h
+ItaniumMangle.po: DiagnosticCommonKinds.inc.h
+ItaniumMangle.po: StmtNodes.inc.h
+LambdaMangleContext.o: AttrList.inc.h
+LambdaMangleContext.o: Attrs.inc.h
+LambdaMangleContext.o: DeclNodes.inc.h
+LambdaMangleContext.o: DiagnosticCommonKinds.inc.h
+LambdaMangleContext.o: StmtNodes.inc.h
+LambdaMangleContext.po: AttrList.inc.h
+LambdaMangleContext.po: Attrs.inc.h
+LambdaMangleContext.po: DeclNodes.inc.h
+LambdaMangleContext.po: DiagnosticCommonKinds.inc.h
+LambdaMangleContext.po: StmtNodes.inc.h
+Mangle.o: AttrList.inc.h
+Mangle.o: Attrs.inc.h
+Mangle.o: DeclNodes.inc.h
+Mangle.o: DiagnosticCommonKinds.inc.h
+Mangle.o: StmtNodes.inc.h
+Mangle.po: AttrList.inc.h
+Mangle.po: Attrs.inc.h
+Mangle.po: DeclNodes.inc.h
+Mangle.po: DiagnosticCommonKinds.inc.h
+Mangle.po: StmtNodes.inc.h
+MicrosoftCXXABI.o: AttrList.inc.h
+MicrosoftCXXABI.o: Attrs.inc.h
+MicrosoftCXXABI.o: DeclNodes.inc.h
+MicrosoftCXXABI.o: DiagnosticCommonKinds.inc.h
+MicrosoftCXXABI.o: StmtNodes.inc.h
+MicrosoftCXXABI.po: AttrList.inc.h
+MicrosoftCXXABI.po: Attrs.inc.h
+MicrosoftCXXABI.po: DeclNodes.inc.h
+MicrosoftCXXABI.po: DiagnosticCommonKinds.inc.h
+MicrosoftCXXABI.po: StmtNodes.inc.h
+MicrosoftMangle.o: AttrList.inc.h
+MicrosoftMangle.o: Attrs.inc.h
+MicrosoftMangle.o: DeclNodes.inc.h
+MicrosoftMangle.o: DiagnosticCommonKinds.inc.h
+MicrosoftMangle.o: StmtNodes.inc.h
+MicrosoftMangle.po: AttrList.inc.h
+MicrosoftMangle.po: Attrs.inc.h
+MicrosoftMangle.po: DeclNodes.inc.h
+MicrosoftMangle.po: DiagnosticCommonKinds.inc.h
+MicrosoftMangle.po: StmtNodes.inc.h
+NSAPI.o: AttrList.inc.h
+NSAPI.o: Attrs.inc.h
+NSAPI.o: DeclNodes.inc.h
+NSAPI.o: DiagnosticCommonKinds.inc.h
+NSAPI.po: AttrList.inc.h
+NSAPI.po: Attrs.inc.h
+NSAPI.po: DeclNodes.inc.h
+NSAPI.po: DiagnosticCommonKinds.inc.h
+NestedNameSpecifier.o: AttrList.inc.h
+NestedNameSpecifier.o: Attrs.inc.h
+NestedNameSpecifier.o: DeclNodes.inc.h
+NestedNameSpecifier.o: DiagnosticCommonKinds.inc.h
+NestedNameSpecifier.o: StmtNodes.inc.h
+NestedNameSpecifier.po: AttrList.inc.h
+NestedNameSpecifier.po: Attrs.inc.h
+NestedNameSpecifier.po: DeclNodes.inc.h
+NestedNameSpecifier.po: DiagnosticCommonKinds.inc.h
+NestedNameSpecifier.po: StmtNodes.inc.h
+ParentMap.o: AttrList.inc.h
+ParentMap.o: Attrs.inc.h
+ParentMap.o: DeclNodes.inc.h
+ParentMap.o: DiagnosticCommonKinds.inc.h
+ParentMap.o: StmtNodes.inc.h
+ParentMap.po: AttrList.inc.h
+ParentMap.po: Attrs.inc.h
+ParentMap.po: DeclNodes.inc.h
+ParentMap.po: DiagnosticCommonKinds.inc.h
+ParentMap.po: StmtNodes.inc.h
+RecordLayout.o: AttrList.inc.h
+RecordLayout.o: Attrs.inc.h
+RecordLayout.o: DeclNodes.inc.h
+RecordLayout.o: DiagnosticCommonKinds.inc.h
+RecordLayout.o: StmtNodes.inc.h
+RecordLayout.po: AttrList.inc.h
+RecordLayout.po: Attrs.inc.h
+RecordLayout.po: DeclNodes.inc.h
+RecordLayout.po: DiagnosticCommonKinds.inc.h
+RecordLayout.po: StmtNodes.inc.h
+RecordLayoutBuilder.o: AttrList.inc.h
+RecordLayoutBuilder.o: Attrs.inc.h
+RecordLayoutBuilder.o: DeclNodes.inc.h
+RecordLayoutBuilder.o: DiagnosticCommonKinds.inc.h
+RecordLayoutBuilder.o: DiagnosticSemaKinds.inc.h
+RecordLayoutBuilder.o: StmtNodes.inc.h
+RecordLayoutBuilder.po: AttrList.inc.h
+RecordLayoutBuilder.po: Attrs.inc.h
+RecordLayoutBuilder.po: DeclNodes.inc.h
+RecordLayoutBuilder.po: DiagnosticCommonKinds.inc.h
+RecordLayoutBuilder.po: DiagnosticSemaKinds.inc.h
+RecordLayoutBuilder.po: StmtNodes.inc.h
+SelectorLocationsKind.o: AttrList.inc.h
+SelectorLocationsKind.o: Attrs.inc.h
+SelectorLocationsKind.o: DeclNodes.inc.h
+SelectorLocationsKind.o: DiagnosticCommonKinds.inc.h
+SelectorLocationsKind.o: StmtNodes.inc.h
+SelectorLocationsKind.po: AttrList.inc.h
+SelectorLocationsKind.po: Attrs.inc.h
+SelectorLocationsKind.po: DeclNodes.inc.h
+SelectorLocationsKind.po: DiagnosticCommonKinds.inc.h
+SelectorLocationsKind.po: StmtNodes.inc.h
+Stmt.o: AttrList.inc.h
+Stmt.o: Attrs.inc.h
+Stmt.o: DeclNodes.inc.h
+Stmt.o: DiagnosticASTKinds.inc.h
+Stmt.o: DiagnosticCommonKinds.inc.h
+Stmt.o: StmtNodes.inc.h
+Stmt.po: AttrList.inc.h
+Stmt.po: Attrs.inc.h
+Stmt.po: DeclNodes.inc.h
+Stmt.po: DiagnosticASTKinds.inc.h
+Stmt.po: DiagnosticCommonKinds.inc.h
+Stmt.po: StmtNodes.inc.h
+StmtDumper.o: AttrList.inc.h
+StmtDumper.o: Attrs.inc.h
+StmtDumper.o: DeclNodes.inc.h
+StmtDumper.o: DiagnosticCommonKinds.inc.h
+StmtDumper.o: StmtNodes.inc.h
+StmtDumper.po: AttrList.inc.h
+StmtDumper.po: Attrs.inc.h
+StmtDumper.po: DeclNodes.inc.h
+StmtDumper.po: DiagnosticCommonKinds.inc.h
+StmtDumper.po: StmtNodes.inc.h
+StmtIterator.o: AttrList.inc.h
+StmtIterator.o: Attrs.inc.h
+StmtIterator.o: DeclNodes.inc.h
+StmtIterator.o: DiagnosticCommonKinds.inc.h
+StmtIterator.po: AttrList.inc.h
+StmtIterator.po: Attrs.inc.h
+StmtIterator.po: DeclNodes.inc.h
+StmtIterator.po: DiagnosticCommonKinds.inc.h
+StmtPrinter.o: AttrList.inc.h
+StmtPrinter.o: Attrs.inc.h
+StmtPrinter.o: DeclNodes.inc.h
+StmtPrinter.o: DiagnosticCommonKinds.inc.h
+StmtPrinter.o: StmtNodes.inc.h
+StmtPrinter.po: AttrList.inc.h
+StmtPrinter.po: Attrs.inc.h
+StmtPrinter.po: DeclNodes.inc.h
+StmtPrinter.po: DiagnosticCommonKinds.inc.h
+StmtPrinter.po: StmtNodes.inc.h
+StmtProfile.o: AttrList.inc.h
+StmtProfile.o: Attrs.inc.h
+StmtProfile.o: DeclNodes.inc.h
+StmtProfile.o: DiagnosticCommonKinds.inc.h
+StmtProfile.o: StmtNodes.inc.h
+StmtProfile.po: AttrList.inc.h
+StmtProfile.po: Attrs.inc.h
+StmtProfile.po: DeclNodes.inc.h
+StmtProfile.po: DiagnosticCommonKinds.inc.h
+StmtProfile.po: StmtNodes.inc.h
+StmtViz.o: AttrList.inc.h
+StmtViz.o: Attrs.inc.h
+StmtViz.o: DeclNodes.inc.h
+StmtViz.o: DiagnosticCommonKinds.inc.h
+StmtViz.o: StmtNodes.inc.h
+StmtViz.po: AttrList.inc.h
+StmtViz.po: Attrs.inc.h
+StmtViz.po: DeclNodes.inc.h
+StmtViz.po: DiagnosticCommonKinds.inc.h
+StmtViz.po: StmtNodes.inc.h
+TemplateBase.o: AttrList.inc.h
+TemplateBase.o: Attrs.inc.h
+TemplateBase.o: DeclNodes.inc.h
+TemplateBase.o: DiagnosticCommonKinds.inc.h
+TemplateBase.o: StmtNodes.inc.h
+TemplateBase.po: AttrList.inc.h
+TemplateBase.po: Attrs.inc.h
+TemplateBase.po: DeclNodes.inc.h
+TemplateBase.po: DiagnosticCommonKinds.inc.h
+TemplateBase.po: StmtNodes.inc.h
+TemplateName.o: AttrList.inc.h
+TemplateName.o: Attrs.inc.h
+TemplateName.o: DeclNodes.inc.h
+TemplateName.o: DiagnosticCommonKinds.inc.h
+TemplateName.o: StmtNodes.inc.h
+TemplateName.po: AttrList.inc.h
+TemplateName.po: Attrs.inc.h
+TemplateName.po: DeclNodes.inc.h
+TemplateName.po: DiagnosticCommonKinds.inc.h
+TemplateName.po: StmtNodes.inc.h
+Type.o: AttrList.inc.h
+Type.o: Attrs.inc.h
+Type.o: DeclNodes.inc.h
+Type.o: DiagnosticCommonKinds.inc.h
+Type.o: StmtNodes.inc.h
+Type.po: AttrList.inc.h
+Type.po: Attrs.inc.h
+Type.po: DeclNodes.inc.h
+Type.po: DiagnosticCommonKinds.inc.h
+Type.po: StmtNodes.inc.h
+TypeLoc.o: AttrList.inc.h
+TypeLoc.o: Attrs.inc.h
+TypeLoc.o: DeclNodes.inc.h
+TypeLoc.o: DiagnosticCommonKinds.inc.h
+TypeLoc.o: StmtNodes.inc.h
+TypeLoc.po: AttrList.inc.h
+TypeLoc.po: Attrs.inc.h
+TypeLoc.po: DeclNodes.inc.h
+TypeLoc.po: DiagnosticCommonKinds.inc.h
+TypeLoc.po: StmtNodes.inc.h
+TypePrinter.o: AttrList.inc.h
+TypePrinter.o: Attrs.inc.h
+TypePrinter.o: DeclNodes.inc.h
+TypePrinter.o: DiagnosticCommonKinds.inc.h
+TypePrinter.o: StmtNodes.inc.h
+TypePrinter.po: AttrList.inc.h
+TypePrinter.po: Attrs.inc.h
+TypePrinter.po: DeclNodes.inc.h
+TypePrinter.po: DiagnosticCommonKinds.inc.h
+TypePrinter.po: StmtNodes.inc.h
+VTTBuilder.o: AttrList.inc.h
+VTTBuilder.o: Attrs.inc.h
+VTTBuilder.o: DeclNodes.inc.h
+VTTBuilder.o: DiagnosticCommonKinds.inc.h
+VTTBuilder.o: StmtNodes.inc.h
+VTTBuilder.po: AttrList.inc.h
+VTTBuilder.po: Attrs.inc.h
+VTTBuilder.po: DeclNodes.inc.h
+VTTBuilder.po: DiagnosticCommonKinds.inc.h
+VTTBuilder.po: StmtNodes.inc.h
+VTableBuilder.o: AttrList.inc.h
+VTableBuilder.o: Attrs.inc.h
+VTableBuilder.o: DeclNodes.inc.h
+VTableBuilder.o: DiagnosticCommonKinds.inc.h
+VTableBuilder.o: StmtNodes.inc.h
+VTableBuilder.po: AttrList.inc.h
+VTableBuilder.po: Attrs.inc.h
+VTableBuilder.po: DeclNodes.inc.h
+VTableBuilder.po: DiagnosticCommonKinds.inc.h
+VTableBuilder.po: StmtNodes.inc.h
+.endif
diff --git a/lib/clang/libclangbasic/Makefile b/lib/clang/libclangbasic/Makefile
index 742cc24..f0efd74 100644
--- a/lib/clang/libclangbasic/Makefile
+++ b/lib/clang/libclangbasic/Makefile
@@ -5,6 +5,7 @@ LIB= clangbasic
SRCDIR= tools/clang/lib/Basic
SRCS= Builtins.cpp \
ConvertUTF.c \
+ ConvertUTFWrapper.cpp \
Diagnostic.cpp \
DiagnosticIDs.cpp \
FileManager.cpp \
@@ -12,6 +13,7 @@ SRCS= Builtins.cpp \
IdentifierTable.cpp \
LangOptions.cpp \
Module.cpp \
+ ObjCRuntime.cpp \
SourceLocation.cpp \
SourceManager.cpp \
TargetInfo.cpp \
@@ -22,6 +24,7 @@ SRCS= Builtins.cpp \
TGHDRS= DiagnosticAnalysisKinds \
DiagnosticASTKinds \
+ DiagnosticCommentKinds \
DiagnosticCommonKinds \
DiagnosticDriverKinds \
DiagnosticFrontendKinds \
diff --git a/lib/clang/libclangbasic/Makefile.depend b/lib/clang/libclangbasic/Makefile.depend
new file mode 100644
index 0000000..2c92226
--- /dev/null
+++ b/lib/clang/libclangbasic/Makefile.depend
@@ -0,0 +1,45 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+Diagnostic.o: DiagnosticCommonKinds.inc.h
+Diagnostic.po: DiagnosticCommonKinds.inc.h
+DiagnosticIDs.o: DiagnosticASTKinds.inc.h
+DiagnosticIDs.o: DiagnosticAnalysisKinds.inc.h
+DiagnosticIDs.o: DiagnosticCommonKinds.inc.h
+DiagnosticIDs.o: DiagnosticDriverKinds.inc.h
+DiagnosticIDs.o: DiagnosticFrontendKinds.inc.h
+DiagnosticIDs.o: DiagnosticGroups.inc.h
+DiagnosticIDs.o: DiagnosticLexKinds.inc.h
+DiagnosticIDs.o: DiagnosticParseKinds.inc.h
+DiagnosticIDs.o: DiagnosticSemaKinds.inc.h
+DiagnosticIDs.o: DiagnosticSerializationKinds.inc.h
+DiagnosticIDs.po: DiagnosticASTKinds.inc.h
+DiagnosticIDs.po: DiagnosticAnalysisKinds.inc.h
+DiagnosticIDs.po: DiagnosticCommonKinds.inc.h
+DiagnosticIDs.po: DiagnosticDriverKinds.inc.h
+DiagnosticIDs.po: DiagnosticFrontendKinds.inc.h
+DiagnosticIDs.po: DiagnosticGroups.inc.h
+DiagnosticIDs.po: DiagnosticLexKinds.inc.h
+DiagnosticIDs.po: DiagnosticParseKinds.inc.h
+DiagnosticIDs.po: DiagnosticSemaKinds.inc.h
+DiagnosticIDs.po: DiagnosticSerializationKinds.inc.h
+SourceManager.o: DiagnosticCommonKinds.inc.h
+SourceManager.po: DiagnosticCommonKinds.inc.h
+Targets.o: DiagnosticCommonKinds.inc.h
+Targets.o: arm_neon.inc.h
+Targets.po: DiagnosticCommonKinds.inc.h
+Targets.po: arm_neon.inc.h
+.endif
diff --git a/lib/clang/libclangcodegen/Makefile b/lib/clang/libclangcodegen/Makefile
index bd7b171..5252e7c 100644
--- a/lib/clang/libclangcodegen/Makefile
+++ b/lib/clang/libclangcodegen/Makefile
@@ -45,6 +45,7 @@ SRCS= BackendUtil.cpp \
TGHDRS= AttrList \
Attrs \
+ CommentNodes \
DeclNodes \
DiagnosticCommonKinds \
DiagnosticFrontendKinds \
diff --git a/lib/clang/libclangcodegen/Makefile.depend b/lib/clang/libclangcodegen/Makefile.depend
new file mode 100644
index 0000000..9ed7af2
--- /dev/null
+++ b/lib/clang/libclangcodegen/Makefile.depend
@@ -0,0 +1,431 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+BackendUtil.o: DiagnosticCommonKinds.inc.h
+BackendUtil.o: DiagnosticFrontendKinds.inc.h
+BackendUtil.po: DiagnosticCommonKinds.inc.h
+BackendUtil.po: DiagnosticFrontendKinds.inc.h
+CGBlocks.o: AttrList.inc.h
+CGBlocks.o: Attrs.inc.h
+CGBlocks.o: DeclNodes.inc.h
+CGBlocks.o: DiagnosticCommonKinds.inc.h
+CGBlocks.o: StmtNodes.inc.h
+CGBlocks.po: AttrList.inc.h
+CGBlocks.po: Attrs.inc.h
+CGBlocks.po: DeclNodes.inc.h
+CGBlocks.po: DiagnosticCommonKinds.inc.h
+CGBlocks.po: StmtNodes.inc.h
+CGBuiltin.o: AttrList.inc.h
+CGBuiltin.o: Attrs.inc.h
+CGBuiltin.o: DeclNodes.inc.h
+CGBuiltin.o: DiagnosticCommonKinds.inc.h
+CGBuiltin.o: Intrinsics.inc.h
+CGBuiltin.o: StmtNodes.inc.h
+CGBuiltin.o: arm_neon.inc.h
+CGBuiltin.po: AttrList.inc.h
+CGBuiltin.po: Attrs.inc.h
+CGBuiltin.po: DeclNodes.inc.h
+CGBuiltin.po: DiagnosticCommonKinds.inc.h
+CGBuiltin.po: Intrinsics.inc.h
+CGBuiltin.po: StmtNodes.inc.h
+CGBuiltin.po: arm_neon.inc.h
+CGCUDANV.o: AttrList.inc.h
+CGCUDANV.o: Attrs.inc.h
+CGCUDANV.o: DeclNodes.inc.h
+CGCUDANV.o: DiagnosticCommonKinds.inc.h
+CGCUDANV.o: StmtNodes.inc.h
+CGCUDANV.po: AttrList.inc.h
+CGCUDANV.po: Attrs.inc.h
+CGCUDANV.po: DeclNodes.inc.h
+CGCUDANV.po: DiagnosticCommonKinds.inc.h
+CGCUDANV.po: StmtNodes.inc.h
+CGCUDARuntime.o: AttrList.inc.h
+CGCUDARuntime.o: Attrs.inc.h
+CGCUDARuntime.o: DeclNodes.inc.h
+CGCUDARuntime.o: DiagnosticCommonKinds.inc.h
+CGCUDARuntime.o: StmtNodes.inc.h
+CGCUDARuntime.po: AttrList.inc.h
+CGCUDARuntime.po: Attrs.inc.h
+CGCUDARuntime.po: DeclNodes.inc.h
+CGCUDARuntime.po: DiagnosticCommonKinds.inc.h
+CGCUDARuntime.po: StmtNodes.inc.h
+CGCXX.o: AttrList.inc.h
+CGCXX.o: Attrs.inc.h
+CGCXX.o: DeclNodes.inc.h
+CGCXX.o: DiagnosticCommonKinds.inc.h
+CGCXX.o: StmtNodes.inc.h
+CGCXX.po: AttrList.inc.h
+CGCXX.po: Attrs.inc.h
+CGCXX.po: DeclNodes.inc.h
+CGCXX.po: DiagnosticCommonKinds.inc.h
+CGCXX.po: StmtNodes.inc.h
+CGCXXABI.o: AttrList.inc.h
+CGCXXABI.o: Attrs.inc.h
+CGCXXABI.o: DeclNodes.inc.h
+CGCXXABI.o: DiagnosticCommonKinds.inc.h
+CGCXXABI.o: StmtNodes.inc.h
+CGCXXABI.po: AttrList.inc.h
+CGCXXABI.po: Attrs.inc.h
+CGCXXABI.po: DeclNodes.inc.h
+CGCXXABI.po: DiagnosticCommonKinds.inc.h
+CGCXXABI.po: StmtNodes.inc.h
+CGCall.o: AttrList.inc.h
+CGCall.o: Attrs.inc.h
+CGCall.o: DeclNodes.inc.h
+CGCall.o: DiagnosticCommonKinds.inc.h
+CGCall.o: StmtNodes.inc.h
+CGCall.po: AttrList.inc.h
+CGCall.po: Attrs.inc.h
+CGCall.po: DeclNodes.inc.h
+CGCall.po: DiagnosticCommonKinds.inc.h
+CGCall.po: StmtNodes.inc.h
+CGClass.o: AttrList.inc.h
+CGClass.o: Attrs.inc.h
+CGClass.o: DeclNodes.inc.h
+CGClass.o: DiagnosticCommonKinds.inc.h
+CGClass.o: StmtNodes.inc.h
+CGClass.po: AttrList.inc.h
+CGClass.po: Attrs.inc.h
+CGClass.po: DeclNodes.inc.h
+CGClass.po: DiagnosticCommonKinds.inc.h
+CGClass.po: StmtNodes.inc.h
+CGCleanup.o: AttrList.inc.h
+CGCleanup.o: Attrs.inc.h
+CGCleanup.o: DeclNodes.inc.h
+CGCleanup.o: DiagnosticCommonKinds.inc.h
+CGCleanup.o: StmtNodes.inc.h
+CGCleanup.po: AttrList.inc.h
+CGCleanup.po: Attrs.inc.h
+CGCleanup.po: DeclNodes.inc.h
+CGCleanup.po: DiagnosticCommonKinds.inc.h
+CGCleanup.po: StmtNodes.inc.h
+CGDebugInfo.o: AttrList.inc.h
+CGDebugInfo.o: Attrs.inc.h
+CGDebugInfo.o: DeclNodes.inc.h
+CGDebugInfo.o: DiagnosticCommonKinds.inc.h
+CGDebugInfo.o: Intrinsics.inc.h
+CGDebugInfo.o: StmtNodes.inc.h
+CGDebugInfo.po: AttrList.inc.h
+CGDebugInfo.po: Attrs.inc.h
+CGDebugInfo.po: DeclNodes.inc.h
+CGDebugInfo.po: DiagnosticCommonKinds.inc.h
+CGDebugInfo.po: Intrinsics.inc.h
+CGDebugInfo.po: StmtNodes.inc.h
+CGDecl.o: AttrList.inc.h
+CGDecl.o: Attrs.inc.h
+CGDecl.o: DeclNodes.inc.h
+CGDecl.o: DiagnosticCommonKinds.inc.h
+CGDecl.o: Intrinsics.inc.h
+CGDecl.o: StmtNodes.inc.h
+CGDecl.po: AttrList.inc.h
+CGDecl.po: Attrs.inc.h
+CGDecl.po: DeclNodes.inc.h
+CGDecl.po: DiagnosticCommonKinds.inc.h
+CGDecl.po: Intrinsics.inc.h
+CGDecl.po: StmtNodes.inc.h
+CGDeclCXX.o: AttrList.inc.h
+CGDeclCXX.o: Attrs.inc.h
+CGDeclCXX.o: DeclNodes.inc.h
+CGDeclCXX.o: DiagnosticCommonKinds.inc.h
+CGDeclCXX.o: Intrinsics.inc.h
+CGDeclCXX.o: StmtNodes.inc.h
+CGDeclCXX.po: AttrList.inc.h
+CGDeclCXX.po: Attrs.inc.h
+CGDeclCXX.po: DeclNodes.inc.h
+CGDeclCXX.po: DiagnosticCommonKinds.inc.h
+CGDeclCXX.po: Intrinsics.inc.h
+CGDeclCXX.po: StmtNodes.inc.h
+CGException.o: AttrList.inc.h
+CGException.o: Attrs.inc.h
+CGException.o: DeclNodes.inc.h
+CGException.o: DiagnosticCommonKinds.inc.h
+CGException.o: Intrinsics.inc.h
+CGException.o: StmtNodes.inc.h
+CGException.po: AttrList.inc.h
+CGException.po: Attrs.inc.h
+CGException.po: DeclNodes.inc.h
+CGException.po: DiagnosticCommonKinds.inc.h
+CGException.po: Intrinsics.inc.h
+CGException.po: StmtNodes.inc.h
+CGExpr.o: AttrList.inc.h
+CGExpr.o: Attrs.inc.h
+CGExpr.o: DeclNodes.inc.h
+CGExpr.o: DiagnosticCommonKinds.inc.h
+CGExpr.o: Intrinsics.inc.h
+CGExpr.o: StmtNodes.inc.h
+CGExpr.po: AttrList.inc.h
+CGExpr.po: Attrs.inc.h
+CGExpr.po: DeclNodes.inc.h
+CGExpr.po: DiagnosticCommonKinds.inc.h
+CGExpr.po: Intrinsics.inc.h
+CGExpr.po: StmtNodes.inc.h
+CGExprAgg.o: AttrList.inc.h
+CGExprAgg.o: Attrs.inc.h
+CGExprAgg.o: DeclNodes.inc.h
+CGExprAgg.o: DiagnosticCommonKinds.inc.h
+CGExprAgg.o: Intrinsics.inc.h
+CGExprAgg.o: StmtNodes.inc.h
+CGExprAgg.po: AttrList.inc.h
+CGExprAgg.po: Attrs.inc.h
+CGExprAgg.po: DeclNodes.inc.h
+CGExprAgg.po: DiagnosticCommonKinds.inc.h
+CGExprAgg.po: Intrinsics.inc.h
+CGExprAgg.po: StmtNodes.inc.h
+CGExprCXX.o: AttrList.inc.h
+CGExprCXX.o: Attrs.inc.h
+CGExprCXX.o: DeclNodes.inc.h
+CGExprCXX.o: DiagnosticCommonKinds.inc.h
+CGExprCXX.o: Intrinsics.inc.h
+CGExprCXX.o: StmtNodes.inc.h
+CGExprCXX.po: AttrList.inc.h
+CGExprCXX.po: Attrs.inc.h
+CGExprCXX.po: DeclNodes.inc.h
+CGExprCXX.po: DiagnosticCommonKinds.inc.h
+CGExprCXX.po: Intrinsics.inc.h
+CGExprCXX.po: StmtNodes.inc.h
+CGExprComplex.o: AttrList.inc.h
+CGExprComplex.o: Attrs.inc.h
+CGExprComplex.o: DeclNodes.inc.h
+CGExprComplex.o: DiagnosticCommonKinds.inc.h
+CGExprComplex.o: StmtNodes.inc.h
+CGExprComplex.po: AttrList.inc.h
+CGExprComplex.po: Attrs.inc.h
+CGExprComplex.po: DeclNodes.inc.h
+CGExprComplex.po: DiagnosticCommonKinds.inc.h
+CGExprComplex.po: StmtNodes.inc.h
+CGExprConstant.o: AttrList.inc.h
+CGExprConstant.o: Attrs.inc.h
+CGExprConstant.o: DeclNodes.inc.h
+CGExprConstant.o: DiagnosticCommonKinds.inc.h
+CGExprConstant.o: StmtNodes.inc.h
+CGExprConstant.po: AttrList.inc.h
+CGExprConstant.po: Attrs.inc.h
+CGExprConstant.po: DeclNodes.inc.h
+CGExprConstant.po: DiagnosticCommonKinds.inc.h
+CGExprConstant.po: StmtNodes.inc.h
+CGExprScalar.o: AttrList.inc.h
+CGExprScalar.o: Attrs.inc.h
+CGExprScalar.o: DeclNodes.inc.h
+CGExprScalar.o: DiagnosticCommonKinds.inc.h
+CGExprScalar.o: Intrinsics.inc.h
+CGExprScalar.o: StmtNodes.inc.h
+CGExprScalar.po: AttrList.inc.h
+CGExprScalar.po: Attrs.inc.h
+CGExprScalar.po: DeclNodes.inc.h
+CGExprScalar.po: DiagnosticCommonKinds.inc.h
+CGExprScalar.po: Intrinsics.inc.h
+CGExprScalar.po: StmtNodes.inc.h
+CGObjC.o: AttrList.inc.h
+CGObjC.o: Attrs.inc.h
+CGObjC.o: DeclNodes.inc.h
+CGObjC.o: DiagnosticCommonKinds.inc.h
+CGObjC.o: StmtNodes.inc.h
+CGObjC.po: AttrList.inc.h
+CGObjC.po: Attrs.inc.h
+CGObjC.po: DeclNodes.inc.h
+CGObjC.po: DiagnosticCommonKinds.inc.h
+CGObjC.po: StmtNodes.inc.h
+CGObjCGNU.o: AttrList.inc.h
+CGObjCGNU.o: Attrs.inc.h
+CGObjCGNU.o: DeclNodes.inc.h
+CGObjCGNU.o: DiagnosticCommonKinds.inc.h
+CGObjCGNU.o: Intrinsics.inc.h
+CGObjCGNU.o: StmtNodes.inc.h
+CGObjCGNU.po: AttrList.inc.h
+CGObjCGNU.po: Attrs.inc.h
+CGObjCGNU.po: DeclNodes.inc.h
+CGObjCGNU.po: DiagnosticCommonKinds.inc.h
+CGObjCGNU.po: Intrinsics.inc.h
+CGObjCGNU.po: StmtNodes.inc.h
+CGObjCMac.o: AttrList.inc.h
+CGObjCMac.o: Attrs.inc.h
+CGObjCMac.o: DeclNodes.inc.h
+CGObjCMac.o: DiagnosticCommonKinds.inc.h
+CGObjCMac.o: Intrinsics.inc.h
+CGObjCMac.o: StmtNodes.inc.h
+CGObjCMac.po: AttrList.inc.h
+CGObjCMac.po: Attrs.inc.h
+CGObjCMac.po: DeclNodes.inc.h
+CGObjCMac.po: DiagnosticCommonKinds.inc.h
+CGObjCMac.po: Intrinsics.inc.h
+CGObjCMac.po: StmtNodes.inc.h
+CGObjCRuntime.o: AttrList.inc.h
+CGObjCRuntime.o: Attrs.inc.h
+CGObjCRuntime.o: DeclNodes.inc.h
+CGObjCRuntime.o: DiagnosticCommonKinds.inc.h
+CGObjCRuntime.o: StmtNodes.inc.h
+CGObjCRuntime.po: AttrList.inc.h
+CGObjCRuntime.po: Attrs.inc.h
+CGObjCRuntime.po: DeclNodes.inc.h
+CGObjCRuntime.po: DiagnosticCommonKinds.inc.h
+CGObjCRuntime.po: StmtNodes.inc.h
+CGOpenCLRuntime.o: AttrList.inc.h
+CGOpenCLRuntime.o: Attrs.inc.h
+CGOpenCLRuntime.o: DeclNodes.inc.h
+CGOpenCLRuntime.o: DiagnosticCommonKinds.inc.h
+CGOpenCLRuntime.o: StmtNodes.inc.h
+CGOpenCLRuntime.po: AttrList.inc.h
+CGOpenCLRuntime.po: Attrs.inc.h
+CGOpenCLRuntime.po: DeclNodes.inc.h
+CGOpenCLRuntime.po: DiagnosticCommonKinds.inc.h
+CGOpenCLRuntime.po: StmtNodes.inc.h
+CGRTTI.o: AttrList.inc.h
+CGRTTI.o: Attrs.inc.h
+CGRTTI.o: DeclNodes.inc.h
+CGRTTI.o: DiagnosticCommonKinds.inc.h
+CGRTTI.o: StmtNodes.inc.h
+CGRTTI.po: AttrList.inc.h
+CGRTTI.po: Attrs.inc.h
+CGRTTI.po: DeclNodes.inc.h
+CGRTTI.po: DiagnosticCommonKinds.inc.h
+CGRTTI.po: StmtNodes.inc.h
+CGRecordLayoutBuilder.o: AttrList.inc.h
+CGRecordLayoutBuilder.o: Attrs.inc.h
+CGRecordLayoutBuilder.o: DeclNodes.inc.h
+CGRecordLayoutBuilder.o: DiagnosticCommonKinds.inc.h
+CGRecordLayoutBuilder.o: StmtNodes.inc.h
+CGRecordLayoutBuilder.po: AttrList.inc.h
+CGRecordLayoutBuilder.po: Attrs.inc.h
+CGRecordLayoutBuilder.po: DeclNodes.inc.h
+CGRecordLayoutBuilder.po: DiagnosticCommonKinds.inc.h
+CGRecordLayoutBuilder.po: StmtNodes.inc.h
+CGStmt.o: AttrList.inc.h
+CGStmt.o: Attrs.inc.h
+CGStmt.o: DeclNodes.inc.h
+CGStmt.o: DiagnosticCommonKinds.inc.h
+CGStmt.o: Intrinsics.inc.h
+CGStmt.o: StmtNodes.inc.h
+CGStmt.po: AttrList.inc.h
+CGStmt.po: Attrs.inc.h
+CGStmt.po: DeclNodes.inc.h
+CGStmt.po: DiagnosticCommonKinds.inc.h
+CGStmt.po: Intrinsics.inc.h
+CGStmt.po: StmtNodes.inc.h
+CGVTT.o: AttrList.inc.h
+CGVTT.o: Attrs.inc.h
+CGVTT.o: DeclNodes.inc.h
+CGVTT.o: DiagnosticCommonKinds.inc.h
+CGVTT.o: StmtNodes.inc.h
+CGVTT.po: AttrList.inc.h
+CGVTT.po: Attrs.inc.h
+CGVTT.po: DeclNodes.inc.h
+CGVTT.po: DiagnosticCommonKinds.inc.h
+CGVTT.po: StmtNodes.inc.h
+CGVTables.o: AttrList.inc.h
+CGVTables.o: Attrs.inc.h
+CGVTables.o: DeclNodes.inc.h
+CGVTables.o: DiagnosticCommonKinds.inc.h
+CGVTables.o: StmtNodes.inc.h
+CGVTables.po: AttrList.inc.h
+CGVTables.po: Attrs.inc.h
+CGVTables.po: DeclNodes.inc.h
+CGVTables.po: DiagnosticCommonKinds.inc.h
+CGVTables.po: StmtNodes.inc.h
+CodeGenAction.o: AttrList.inc.h
+CodeGenAction.o: Attrs.inc.h
+CodeGenAction.o: DeclNodes.inc.h
+CodeGenAction.o: DiagnosticCommonKinds.inc.h
+CodeGenAction.o: DiagnosticFrontendKinds.inc.h
+CodeGenAction.po: AttrList.inc.h
+CodeGenAction.po: Attrs.inc.h
+CodeGenAction.po: DeclNodes.inc.h
+CodeGenAction.po: DiagnosticCommonKinds.inc.h
+CodeGenAction.po: DiagnosticFrontendKinds.inc.h
+CodeGenFunction.o: AttrList.inc.h
+CodeGenFunction.o: Attrs.inc.h
+CodeGenFunction.o: DeclNodes.inc.h
+CodeGenFunction.o: DiagnosticCommonKinds.inc.h
+CodeGenFunction.o: Intrinsics.inc.h
+CodeGenFunction.o: StmtNodes.inc.h
+CodeGenFunction.po: AttrList.inc.h
+CodeGenFunction.po: Attrs.inc.h
+CodeGenFunction.po: DeclNodes.inc.h
+CodeGenFunction.po: DiagnosticCommonKinds.inc.h
+CodeGenFunction.po: Intrinsics.inc.h
+CodeGenFunction.po: StmtNodes.inc.h
+CodeGenModule.o: AttrList.inc.h
+CodeGenModule.o: Attrs.inc.h
+CodeGenModule.o: DeclNodes.inc.h
+CodeGenModule.o: DiagnosticCommonKinds.inc.h
+CodeGenModule.o: Intrinsics.inc.h
+CodeGenModule.o: StmtNodes.inc.h
+CodeGenModule.po: AttrList.inc.h
+CodeGenModule.po: Attrs.inc.h
+CodeGenModule.po: DeclNodes.inc.h
+CodeGenModule.po: DiagnosticCommonKinds.inc.h
+CodeGenModule.po: Intrinsics.inc.h
+CodeGenModule.po: StmtNodes.inc.h
+CodeGenTBAA.o: AttrList.inc.h
+CodeGenTBAA.o: Attrs.inc.h
+CodeGenTBAA.o: DeclNodes.inc.h
+CodeGenTBAA.o: DiagnosticCommonKinds.inc.h
+CodeGenTBAA.po: AttrList.inc.h
+CodeGenTBAA.po: Attrs.inc.h
+CodeGenTBAA.po: DeclNodes.inc.h
+CodeGenTBAA.po: DiagnosticCommonKinds.inc.h
+CodeGenTypes.o: AttrList.inc.h
+CodeGenTypes.o: Attrs.inc.h
+CodeGenTypes.o: DeclNodes.inc.h
+CodeGenTypes.o: DiagnosticCommonKinds.inc.h
+CodeGenTypes.o: StmtNodes.inc.h
+CodeGenTypes.po: AttrList.inc.h
+CodeGenTypes.po: Attrs.inc.h
+CodeGenTypes.po: DeclNodes.inc.h
+CodeGenTypes.po: DiagnosticCommonKinds.inc.h
+CodeGenTypes.po: StmtNodes.inc.h
+ItaniumCXXABI.o: AttrList.inc.h
+ItaniumCXXABI.o: Attrs.inc.h
+ItaniumCXXABI.o: DeclNodes.inc.h
+ItaniumCXXABI.o: DiagnosticCommonKinds.inc.h
+ItaniumCXXABI.o: Intrinsics.inc.h
+ItaniumCXXABI.o: StmtNodes.inc.h
+ItaniumCXXABI.po: AttrList.inc.h
+ItaniumCXXABI.po: Attrs.inc.h
+ItaniumCXXABI.po: DeclNodes.inc.h
+ItaniumCXXABI.po: DiagnosticCommonKinds.inc.h
+ItaniumCXXABI.po: Intrinsics.inc.h
+ItaniumCXXABI.po: StmtNodes.inc.h
+MicrosoftCXXABI.o: AttrList.inc.h
+MicrosoftCXXABI.o: Attrs.inc.h
+MicrosoftCXXABI.o: DeclNodes.inc.h
+MicrosoftCXXABI.o: DiagnosticCommonKinds.inc.h
+MicrosoftCXXABI.o: StmtNodes.inc.h
+MicrosoftCXXABI.po: AttrList.inc.h
+MicrosoftCXXABI.po: Attrs.inc.h
+MicrosoftCXXABI.po: DeclNodes.inc.h
+MicrosoftCXXABI.po: DiagnosticCommonKinds.inc.h
+MicrosoftCXXABI.po: StmtNodes.inc.h
+ModuleBuilder.o: AttrList.inc.h
+ModuleBuilder.o: Attrs.inc.h
+ModuleBuilder.o: DeclNodes.inc.h
+ModuleBuilder.o: DiagnosticCommonKinds.inc.h
+ModuleBuilder.o: StmtNodes.inc.h
+ModuleBuilder.po: AttrList.inc.h
+ModuleBuilder.po: Attrs.inc.h
+ModuleBuilder.po: DeclNodes.inc.h
+ModuleBuilder.po: DiagnosticCommonKinds.inc.h
+ModuleBuilder.po: StmtNodes.inc.h
+TargetInfo.o: AttrList.inc.h
+TargetInfo.o: Attrs.inc.h
+TargetInfo.o: DeclNodes.inc.h
+TargetInfo.o: DiagnosticCommonKinds.inc.h
+TargetInfo.o: StmtNodes.inc.h
+TargetInfo.po: AttrList.inc.h
+TargetInfo.po: Attrs.inc.h
+TargetInfo.po: DeclNodes.inc.h
+TargetInfo.po: DiagnosticCommonKinds.inc.h
+TargetInfo.po: StmtNodes.inc.h
+.endif
diff --git a/lib/clang/libclangdriver/Makefile b/lib/clang/libclangdriver/Makefile
index 53d49d1..4950cfa 100644
--- a/lib/clang/libclangdriver/Makefile
+++ b/lib/clang/libclangdriver/Makefile
@@ -7,7 +7,6 @@ SRCS= Action.cpp \
Arg.cpp \
ArgList.cpp \
CC1AsOptions.cpp \
- CC1Options.cpp \
Compilation.cpp \
Driver.cpp \
DriverOptions.cpp \
@@ -23,7 +22,6 @@ SRCS= Action.cpp \
WindowsToolChain.cpp
TGHDRS= CC1AsOptions \
- CC1Options \
DiagnosticCommonKinds \
DiagnosticDriverKinds \
Options
diff --git a/lib/clang/libclangdriver/Makefile.depend b/lib/clang/libclangdriver/Makefile.depend
new file mode 100644
index 0000000..dab9912
--- /dev/null
+++ b/lib/clang/libclangdriver/Makefile.depend
@@ -0,0 +1,61 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+ArgList.o: DiagnosticCommonKinds.inc.h
+ArgList.o: DiagnosticDriverKinds.inc.h
+ArgList.po: DiagnosticCommonKinds.inc.h
+ArgList.po: DiagnosticDriverKinds.inc.h
+CC1AsOptions.o: CC1AsOptions.inc.h
+CC1AsOptions.po: CC1AsOptions.inc.h
+CC1Options.o: CC1Options.inc.h
+CC1Options.po: CC1Options.inc.h
+Compilation.o: DiagnosticCommonKinds.inc.h
+Compilation.o: DiagnosticDriverKinds.inc.h
+Compilation.o: Options.inc.h
+Compilation.po: DiagnosticCommonKinds.inc.h
+Compilation.po: DiagnosticDriverKinds.inc.h
+Compilation.po: Options.inc.h
+Driver.o: DiagnosticCommonKinds.inc.h
+Driver.o: DiagnosticDriverKinds.inc.h
+Driver.o: Options.inc.h
+Driver.po: DiagnosticCommonKinds.inc.h
+Driver.po: DiagnosticDriverKinds.inc.h
+Driver.po: Options.inc.h
+DriverOptions.o: Options.inc.h
+DriverOptions.po: Options.inc.h
+ToolChain.o: DiagnosticCommonKinds.inc.h
+ToolChain.o: DiagnosticDriverKinds.inc.h
+ToolChain.o: Options.inc.h
+ToolChain.po: DiagnosticCommonKinds.inc.h
+ToolChain.po: DiagnosticDriverKinds.inc.h
+ToolChain.po: Options.inc.h
+ToolChains.o: DiagnosticCommonKinds.inc.h
+ToolChains.o: DiagnosticDriverKinds.inc.h
+ToolChains.o: Options.inc.h
+ToolChains.po: DiagnosticCommonKinds.inc.h
+ToolChains.po: DiagnosticDriverKinds.inc.h
+ToolChains.po: Options.inc.h
+Tools.o: DiagnosticCommonKinds.inc.h
+Tools.o: DiagnosticDriverKinds.inc.h
+Tools.o: Options.inc.h
+Tools.po: DiagnosticCommonKinds.inc.h
+Tools.po: DiagnosticDriverKinds.inc.h
+Tools.po: Options.inc.h
+WindowsToolChain.o: DiagnosticCommonKinds.inc.h
+WindowsToolChain.o: Options.inc.h
+WindowsToolChain.po: DiagnosticCommonKinds.inc.h
+WindowsToolChain.po: Options.inc.h
+.endif
diff --git a/lib/clang/libclangedit/Makefile b/lib/clang/libclangedit/Makefile
index 147d133..a0e45a9 100644
--- a/lib/clang/libclangedit/Makefile
+++ b/lib/clang/libclangedit/Makefile
@@ -9,6 +9,7 @@ SRCS= Commit.cpp \
TGHDRS= AttrList \
Attrs \
+ CommentNodes \
DeclNodes \
StmtNodes \
DiagnosticCommonKinds
diff --git a/lib/clang/libclangedit/Makefile.depend b/lib/clang/libclangedit/Makefile.depend
new file mode 100644
index 0000000..9c2823c
--- /dev/null
+++ b/lib/clang/libclangedit/Makefile.depend
@@ -0,0 +1,29 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+Commit.o: DiagnosticCommonKinds.inc.h
+Commit.po: DiagnosticCommonKinds.inc.h
+RewriteObjCFoundationAPI.o: AttrList.inc.h
+RewriteObjCFoundationAPI.o: Attrs.inc.h
+RewriteObjCFoundationAPI.o: DeclNodes.inc.h
+RewriteObjCFoundationAPI.o: DiagnosticCommonKinds.inc.h
+RewriteObjCFoundationAPI.o: StmtNodes.inc.h
+RewriteObjCFoundationAPI.po: AttrList.inc.h
+RewriteObjCFoundationAPI.po: Attrs.inc.h
+RewriteObjCFoundationAPI.po: DeclNodes.inc.h
+RewriteObjCFoundationAPI.po: DiagnosticCommonKinds.inc.h
+RewriteObjCFoundationAPI.po: StmtNodes.inc.h
+.endif
diff --git a/lib/clang/libclangfrontend/Makefile b/lib/clang/libclangfrontend/Makefile
index 0ef026b..c2813b4 100644
--- a/lib/clang/libclangfrontend/Makefile
+++ b/lib/clang/libclangfrontend/Makefile
@@ -36,7 +36,7 @@ SRCS= ASTConsumers.cpp \
TGHDRS= AttrList \
AttrParsedAttrList \
Attrs \
- CC1Options \
+ CommentNodes \
DeclNodes \
DiagnosticASTKinds \
DiagnosticCommonKinds \
diff --git a/lib/clang/libclangfrontend/Makefile.depend b/lib/clang/libclangfrontend/Makefile.depend
new file mode 100644
index 0000000..a9a8a2a
--- /dev/null
+++ b/lib/clang/libclangfrontend/Makefile.depend
@@ -0,0 +1,189 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+ASTConsumers.o: AttrList.inc.h
+ASTConsumers.o: Attrs.inc.h
+ASTConsumers.o: DeclNodes.inc.h
+ASTConsumers.o: DiagnosticCommonKinds.inc.h
+ASTConsumers.o: StmtNodes.inc.h
+ASTConsumers.po: AttrList.inc.h
+ASTConsumers.po: Attrs.inc.h
+ASTConsumers.po: DeclNodes.inc.h
+ASTConsumers.po: DiagnosticCommonKinds.inc.h
+ASTConsumers.po: StmtNodes.inc.h
+ASTMerge.o: AttrList.inc.h
+ASTMerge.o: AttrParsedAttrList.inc.h
+ASTMerge.o: Attrs.inc.h
+ASTMerge.o: DeclNodes.inc.h
+ASTMerge.o: DiagnosticASTKinds.inc.h
+ASTMerge.o: DiagnosticCommonKinds.inc.h
+ASTMerge.o: StmtNodes.inc.h
+ASTMerge.po: AttrList.inc.h
+ASTMerge.po: AttrParsedAttrList.inc.h
+ASTMerge.po: Attrs.inc.h
+ASTMerge.po: DeclNodes.inc.h
+ASTMerge.po: DiagnosticASTKinds.inc.h
+ASTMerge.po: DiagnosticCommonKinds.inc.h
+ASTMerge.po: StmtNodes.inc.h
+ASTUnit.o: AttrList.inc.h
+ASTUnit.o: AttrParsedAttrList.inc.h
+ASTUnit.o: Attrs.inc.h
+ASTUnit.o: DeclNodes.inc.h
+ASTUnit.o: DiagnosticCommonKinds.inc.h
+ASTUnit.o: DiagnosticFrontendKinds.inc.h
+ASTUnit.o: Options.inc.h
+ASTUnit.o: StmtNodes.inc.h
+ASTUnit.po: AttrList.inc.h
+ASTUnit.po: AttrParsedAttrList.inc.h
+ASTUnit.po: Attrs.inc.h
+ASTUnit.po: DeclNodes.inc.h
+ASTUnit.po: DiagnosticCommonKinds.inc.h
+ASTUnit.po: DiagnosticFrontendKinds.inc.h
+ASTUnit.po: Options.inc.h
+ASTUnit.po: StmtNodes.inc.h
+CacheTokens.o: DiagnosticCommonKinds.inc.h
+CacheTokens.po: DiagnosticCommonKinds.inc.h
+ChainedDiagnosticConsumer.o: DiagnosticCommonKinds.inc.h
+ChainedDiagnosticConsumer.po: DiagnosticCommonKinds.inc.h
+ChainedIncludesSource.o: AttrList.inc.h
+ChainedIncludesSource.o: AttrParsedAttrList.inc.h
+ChainedIncludesSource.o: Attrs.inc.h
+ChainedIncludesSource.o: DeclNodes.inc.h
+ChainedIncludesSource.o: DiagnosticCommonKinds.inc.h
+ChainedIncludesSource.o: StmtNodes.inc.h
+ChainedIncludesSource.po: AttrList.inc.h
+ChainedIncludesSource.po: AttrParsedAttrList.inc.h
+ChainedIncludesSource.po: Attrs.inc.h
+ChainedIncludesSource.po: DeclNodes.inc.h
+ChainedIncludesSource.po: DiagnosticCommonKinds.inc.h
+ChainedIncludesSource.po: StmtNodes.inc.h
+CompilerInstance.o: AttrList.inc.h
+CompilerInstance.o: AttrParsedAttrList.inc.h
+CompilerInstance.o: Attrs.inc.h
+CompilerInstance.o: DeclNodes.inc.h
+CompilerInstance.o: DiagnosticCommonKinds.inc.h
+CompilerInstance.o: DiagnosticFrontendKinds.inc.h
+CompilerInstance.o: StmtNodes.inc.h
+CompilerInstance.po: AttrList.inc.h
+CompilerInstance.po: AttrParsedAttrList.inc.h
+CompilerInstance.po: Attrs.inc.h
+CompilerInstance.po: DeclNodes.inc.h
+CompilerInstance.po: DiagnosticCommonKinds.inc.h
+CompilerInstance.po: DiagnosticFrontendKinds.inc.h
+CompilerInstance.po: StmtNodes.inc.h
+CompilerInvocation.o: AttrList.inc.h
+CompilerInvocation.o: Attrs.inc.h
+CompilerInvocation.o: CC1Options.inc.h
+CompilerInvocation.o: DeclNodes.inc.h
+CompilerInvocation.o: DiagnosticCommonKinds.inc.h
+CompilerInvocation.o: DiagnosticDriverKinds.inc.h
+CompilerInvocation.po: AttrList.inc.h
+CompilerInvocation.po: Attrs.inc.h
+CompilerInvocation.po: CC1Options.inc.h
+CompilerInvocation.po: DeclNodes.inc.h
+CompilerInvocation.po: DiagnosticCommonKinds.inc.h
+CompilerInvocation.po: DiagnosticDriverKinds.inc.h
+CreateInvocationFromCommandLine.o: DiagnosticCommonKinds.inc.h
+CreateInvocationFromCommandLine.o: DiagnosticFrontendKinds.inc.h
+CreateInvocationFromCommandLine.o: Options.inc.h
+CreateInvocationFromCommandLine.po: DiagnosticCommonKinds.inc.h
+CreateInvocationFromCommandLine.po: DiagnosticFrontendKinds.inc.h
+CreateInvocationFromCommandLine.po: Options.inc.h
+DependencyFile.o: DiagnosticCommonKinds.inc.h
+DependencyFile.o: DiagnosticFrontendKinds.inc.h
+DependencyFile.o: DiagnosticLexKinds.inc.h
+DependencyFile.po: DiagnosticCommonKinds.inc.h
+DependencyFile.po: DiagnosticFrontendKinds.inc.h
+DependencyFile.po: DiagnosticLexKinds.inc.h
+DependencyGraph.o: DiagnosticCommonKinds.inc.h
+DependencyGraph.o: DiagnosticFrontendKinds.inc.h
+DependencyGraph.po: DiagnosticCommonKinds.inc.h
+DependencyGraph.po: DiagnosticFrontendKinds.inc.h
+DiagnosticRenderer.o: DiagnosticCommonKinds.inc.h
+DiagnosticRenderer.po: DiagnosticCommonKinds.inc.h
+FrontendAction.o: AttrList.inc.h
+FrontendAction.o: AttrParsedAttrList.inc.h
+FrontendAction.o: Attrs.inc.h
+FrontendAction.o: DeclNodes.inc.h
+FrontendAction.o: DiagnosticCommonKinds.inc.h
+FrontendAction.o: DiagnosticFrontendKinds.inc.h
+FrontendAction.o: StmtNodes.inc.h
+FrontendAction.po: AttrList.inc.h
+FrontendAction.po: AttrParsedAttrList.inc.h
+FrontendAction.po: Attrs.inc.h
+FrontendAction.po: DeclNodes.inc.h
+FrontendAction.po: DiagnosticCommonKinds.inc.h
+FrontendAction.po: DiagnosticFrontendKinds.inc.h
+FrontendAction.po: StmtNodes.inc.h
+FrontendActions.o: AttrList.inc.h
+FrontendActions.o: AttrParsedAttrList.inc.h
+FrontendActions.o: Attrs.inc.h
+FrontendActions.o: DeclNodes.inc.h
+FrontendActions.o: DiagnosticCommonKinds.inc.h
+FrontendActions.o: DiagnosticFrontendKinds.inc.h
+FrontendActions.o: StmtNodes.inc.h
+FrontendActions.po: AttrList.inc.h
+FrontendActions.po: AttrParsedAttrList.inc.h
+FrontendActions.po: Attrs.inc.h
+FrontendActions.po: DeclNodes.inc.h
+FrontendActions.po: DiagnosticCommonKinds.inc.h
+FrontendActions.po: DiagnosticFrontendKinds.inc.h
+FrontendActions.po: StmtNodes.inc.h
+HeaderIncludeGen.o: DiagnosticCommonKinds.inc.h
+HeaderIncludeGen.o: DiagnosticFrontendKinds.inc.h
+HeaderIncludeGen.po: DiagnosticCommonKinds.inc.h
+HeaderIncludeGen.po: DiagnosticFrontendKinds.inc.h
+InitHeaderSearch.o: DiagnosticCommonKinds.inc.h
+InitHeaderSearch.po: DiagnosticCommonKinds.inc.h
+InitPreprocessor.o: DiagnosticCommonKinds.inc.h
+InitPreprocessor.o: DiagnosticFrontendKinds.inc.h
+InitPreprocessor.po: DiagnosticCommonKinds.inc.h
+InitPreprocessor.po: DiagnosticFrontendKinds.inc.h
+LayoutOverrideSource.o: AttrList.inc.h
+LayoutOverrideSource.o: Attrs.inc.h
+LayoutOverrideSource.o: DeclNodes.inc.h
+LayoutOverrideSource.o: DiagnosticCommonKinds.inc.h
+LayoutOverrideSource.po: AttrList.inc.h
+LayoutOverrideSource.po: Attrs.inc.h
+LayoutOverrideSource.po: DeclNodes.inc.h
+LayoutOverrideSource.po: DiagnosticCommonKinds.inc.h
+LogDiagnosticPrinter.o: DiagnosticCommonKinds.inc.h
+LogDiagnosticPrinter.po: DiagnosticCommonKinds.inc.h
+MultiplexConsumer.o: DiagnosticCommonKinds.inc.h
+MultiplexConsumer.po: DiagnosticCommonKinds.inc.h
+PrintPreprocessedOutput.o: DiagnosticCommonKinds.inc.h
+PrintPreprocessedOutput.po: DiagnosticCommonKinds.inc.h
+SerializedDiagnosticPrinter.o: DiagnosticCommonKinds.inc.h
+SerializedDiagnosticPrinter.po: DiagnosticCommonKinds.inc.h
+TextDiagnostic.o: DiagnosticCommonKinds.inc.h
+TextDiagnostic.po: DiagnosticCommonKinds.inc.h
+TextDiagnosticBuffer.o: DiagnosticCommonKinds.inc.h
+TextDiagnosticBuffer.po: DiagnosticCommonKinds.inc.h
+TextDiagnosticPrinter.o: DiagnosticCommonKinds.inc.h
+TextDiagnosticPrinter.po: DiagnosticCommonKinds.inc.h
+VerifyDiagnosticConsumer.o: DiagnosticCommonKinds.inc.h
+VerifyDiagnosticConsumer.o: DiagnosticFrontendKinds.inc.h
+VerifyDiagnosticConsumer.po: DiagnosticCommonKinds.inc.h
+VerifyDiagnosticConsumer.po: DiagnosticFrontendKinds.inc.h
+Warnings.o: DiagnosticCommonKinds.inc.h
+Warnings.o: DiagnosticFrontendKinds.inc.h
+Warnings.o: DiagnosticLexKinds.inc.h
+Warnings.o: DiagnosticSemaKinds.inc.h
+Warnings.po: DiagnosticCommonKinds.inc.h
+Warnings.po: DiagnosticFrontendKinds.inc.h
+Warnings.po: DiagnosticLexKinds.inc.h
+Warnings.po: DiagnosticSemaKinds.inc.h
+.endif
diff --git a/lib/clang/libclangfrontendtool/Makefile b/lib/clang/libclangfrontendtool/Makefile
index fd52d67..f37979f 100644
--- a/lib/clang/libclangfrontendtool/Makefile
+++ b/lib/clang/libclangfrontendtool/Makefile
@@ -5,8 +5,8 @@ LIB= clangfrontendtool
SRCDIR= tools/clang/lib/FrontendTool
SRCS= ExecuteCompilerInvocation.cpp
-TGHDRS= CC1Options \
- DiagnosticCommonKinds \
- DiagnosticFrontendKinds
+TGHDRS= DiagnosticCommonKinds \
+ DiagnosticFrontendKinds \
+ Options
.include "../clang.lib.mk"
diff --git a/lib/clang/libclangfrontendtool/Makefile.depend b/lib/clang/libclangfrontendtool/Makefile.depend
new file mode 100644
index 0000000..0c4a02d
--- /dev/null
+++ b/lib/clang/libclangfrontendtool/Makefile.depend
@@ -0,0 +1,23 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+ExecuteCompilerInvocation.o: CC1Options.inc.h
+ExecuteCompilerInvocation.o: DiagnosticCommonKinds.inc.h
+ExecuteCompilerInvocation.o: DiagnosticFrontendKinds.inc.h
+ExecuteCompilerInvocation.po: CC1Options.inc.h
+ExecuteCompilerInvocation.po: DiagnosticCommonKinds.inc.h
+ExecuteCompilerInvocation.po: DiagnosticFrontendKinds.inc.h
+.endif
diff --git a/lib/clang/libclanglex/Makefile.depend b/lib/clang/libclanglex/Makefile.depend
new file mode 100644
index 0000000..b0b30a1
--- /dev/null
+++ b/lib/clang/libclanglex/Makefile.depend
@@ -0,0 +1,83 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+HeaderSearch.o: DiagnosticCommonKinds.inc.h
+HeaderSearch.po: DiagnosticCommonKinds.inc.h
+Lexer.o: DiagnosticCommonKinds.inc.h
+Lexer.o: DiagnosticLexKinds.inc.h
+Lexer.po: DiagnosticCommonKinds.inc.h
+Lexer.po: DiagnosticLexKinds.inc.h
+LiteralSupport.o: DiagnosticCommonKinds.inc.h
+LiteralSupport.o: DiagnosticLexKinds.inc.h
+LiteralSupport.po: DiagnosticCommonKinds.inc.h
+LiteralSupport.po: DiagnosticLexKinds.inc.h
+MacroArgs.o: DiagnosticCommonKinds.inc.h
+MacroArgs.o: DiagnosticLexKinds.inc.h
+MacroArgs.po: DiagnosticCommonKinds.inc.h
+MacroArgs.po: DiagnosticLexKinds.inc.h
+MacroInfo.o: DiagnosticCommonKinds.inc.h
+MacroInfo.po: DiagnosticCommonKinds.inc.h
+ModuleMap.o: DiagnosticCommonKinds.inc.h
+ModuleMap.o: DiagnosticLexKinds.inc.h
+ModuleMap.po: DiagnosticCommonKinds.inc.h
+ModuleMap.po: DiagnosticLexKinds.inc.h
+PPCaching.o: DiagnosticCommonKinds.inc.h
+PPCaching.po: DiagnosticCommonKinds.inc.h
+PPCallbacks.o: DiagnosticCommonKinds.inc.h
+PPCallbacks.po: DiagnosticCommonKinds.inc.h
+PPDirectives.o: DiagnosticCommonKinds.inc.h
+PPDirectives.o: DiagnosticLexKinds.inc.h
+PPDirectives.po: DiagnosticCommonKinds.inc.h
+PPDirectives.po: DiagnosticLexKinds.inc.h
+PPExpressions.o: DiagnosticCommonKinds.inc.h
+PPExpressions.o: DiagnosticLexKinds.inc.h
+PPExpressions.po: DiagnosticCommonKinds.inc.h
+PPExpressions.po: DiagnosticLexKinds.inc.h
+PPLexerChange.o: DiagnosticCommonKinds.inc.h
+PPLexerChange.o: DiagnosticLexKinds.inc.h
+PPLexerChange.po: DiagnosticCommonKinds.inc.h
+PPLexerChange.po: DiagnosticLexKinds.inc.h
+PPMacroExpansion.o: AttrSpellings.inc.h
+PPMacroExpansion.o: DiagnosticCommonKinds.inc.h
+PPMacroExpansion.o: DiagnosticLexKinds.inc.h
+PPMacroExpansion.po: AttrSpellings.inc.h
+PPMacroExpansion.po: DiagnosticCommonKinds.inc.h
+PPMacroExpansion.po: DiagnosticLexKinds.inc.h
+PTHLexer.o: DiagnosticCommonKinds.inc.h
+PTHLexer.o: DiagnosticLexKinds.inc.h
+PTHLexer.po: DiagnosticCommonKinds.inc.h
+PTHLexer.po: DiagnosticLexKinds.inc.h
+Pragma.o: DiagnosticCommonKinds.inc.h
+Pragma.o: DiagnosticLexKinds.inc.h
+Pragma.po: DiagnosticCommonKinds.inc.h
+Pragma.po: DiagnosticLexKinds.inc.h
+PreprocessingRecord.o: DiagnosticCommonKinds.inc.h
+PreprocessingRecord.po: DiagnosticCommonKinds.inc.h
+Preprocessor.o: DiagnosticCommonKinds.inc.h
+Preprocessor.o: DiagnosticLexKinds.inc.h
+Preprocessor.po: DiagnosticCommonKinds.inc.h
+Preprocessor.po: DiagnosticLexKinds.inc.h
+PreprocessorLexer.o: DiagnosticCommonKinds.inc.h
+PreprocessorLexer.o: DiagnosticLexKinds.inc.h
+PreprocessorLexer.po: DiagnosticCommonKinds.inc.h
+PreprocessorLexer.po: DiagnosticLexKinds.inc.h
+TokenConcatenation.o: DiagnosticCommonKinds.inc.h
+TokenConcatenation.po: DiagnosticCommonKinds.inc.h
+TokenLexer.o: DiagnosticCommonKinds.inc.h
+TokenLexer.o: DiagnosticLexKinds.inc.h
+TokenLexer.po: DiagnosticCommonKinds.inc.h
+TokenLexer.po: DiagnosticLexKinds.inc.h
+.endif
diff --git a/lib/clang/libclangparse/Makefile b/lib/clang/libclangparse/Makefile
index 1bf46a8..599a034 100644
--- a/lib/clang/libclangparse/Makefile
+++ b/lib/clang/libclangparse/Makefile
@@ -21,6 +21,7 @@ TGHDRS= AttrLateParsed \
AttrList \
AttrParsedAttrList \
Attrs \
+ CommentNodes \
DeclNodes \
DiagnosticCommonKinds \
DiagnosticParseKinds \
diff --git a/lib/clang/libclangparse/Makefile.depend b/lib/clang/libclangparse/Makefile.depend
new file mode 100644
index 0000000..ebf96ff
--- /dev/null
+++ b/lib/clang/libclangparse/Makefile.depend
@@ -0,0 +1,199 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+ParseAST.o: AttrList.inc.h
+ParseAST.o: AttrParsedAttrList.inc.h
+ParseAST.o: Attrs.inc.h
+ParseAST.o: DeclNodes.inc.h
+ParseAST.o: DiagnosticCommonKinds.inc.h
+ParseAST.o: StmtNodes.inc.h
+ParseAST.po: AttrList.inc.h
+ParseAST.po: AttrParsedAttrList.inc.h
+ParseAST.po: Attrs.inc.h
+ParseAST.po: DeclNodes.inc.h
+ParseAST.po: DiagnosticCommonKinds.inc.h
+ParseAST.po: StmtNodes.inc.h
+ParseCXXInlineMethods.o: AttrList.inc.h
+ParseCXXInlineMethods.o: AttrParsedAttrList.inc.h
+ParseCXXInlineMethods.o: Attrs.inc.h
+ParseCXXInlineMethods.o: DeclNodes.inc.h
+ParseCXXInlineMethods.o: DiagnosticCommonKinds.inc.h
+ParseCXXInlineMethods.o: DiagnosticParseKinds.inc.h
+ParseCXXInlineMethods.o: StmtNodes.inc.h
+ParseCXXInlineMethods.po: AttrList.inc.h
+ParseCXXInlineMethods.po: AttrParsedAttrList.inc.h
+ParseCXXInlineMethods.po: Attrs.inc.h
+ParseCXXInlineMethods.po: DeclNodes.inc.h
+ParseCXXInlineMethods.po: DiagnosticCommonKinds.inc.h
+ParseCXXInlineMethods.po: DiagnosticParseKinds.inc.h
+ParseCXXInlineMethods.po: StmtNodes.inc.h
+ParseDecl.o: AttrLateParsed.inc.h
+ParseDecl.o: AttrList.inc.h
+ParseDecl.o: AttrParsedAttrList.inc.h
+ParseDecl.o: Attrs.inc.h
+ParseDecl.o: DeclNodes.inc.h
+ParseDecl.o: DiagnosticCommonKinds.inc.h
+ParseDecl.o: DiagnosticParseKinds.inc.h
+ParseDecl.o: StmtNodes.inc.h
+ParseDecl.po: AttrLateParsed.inc.h
+ParseDecl.po: AttrList.inc.h
+ParseDecl.po: AttrParsedAttrList.inc.h
+ParseDecl.po: Attrs.inc.h
+ParseDecl.po: DeclNodes.inc.h
+ParseDecl.po: DiagnosticCommonKinds.inc.h
+ParseDecl.po: DiagnosticParseKinds.inc.h
+ParseDecl.po: StmtNodes.inc.h
+ParseDeclCXX.o: AttrList.inc.h
+ParseDeclCXX.o: AttrParsedAttrList.inc.h
+ParseDeclCXX.o: Attrs.inc.h
+ParseDeclCXX.o: DeclNodes.inc.h
+ParseDeclCXX.o: DiagnosticCommonKinds.inc.h
+ParseDeclCXX.o: DiagnosticParseKinds.inc.h
+ParseDeclCXX.o: StmtNodes.inc.h
+ParseDeclCXX.po: AttrList.inc.h
+ParseDeclCXX.po: AttrParsedAttrList.inc.h
+ParseDeclCXX.po: Attrs.inc.h
+ParseDeclCXX.po: DeclNodes.inc.h
+ParseDeclCXX.po: DiagnosticCommonKinds.inc.h
+ParseDeclCXX.po: DiagnosticParseKinds.inc.h
+ParseDeclCXX.po: StmtNodes.inc.h
+ParseExpr.o: AttrList.inc.h
+ParseExpr.o: AttrParsedAttrList.inc.h
+ParseExpr.o: Attrs.inc.h
+ParseExpr.o: DeclNodes.inc.h
+ParseExpr.o: DiagnosticCommonKinds.inc.h
+ParseExpr.o: DiagnosticParseKinds.inc.h
+ParseExpr.o: StmtNodes.inc.h
+ParseExpr.po: AttrList.inc.h
+ParseExpr.po: AttrParsedAttrList.inc.h
+ParseExpr.po: Attrs.inc.h
+ParseExpr.po: DeclNodes.inc.h
+ParseExpr.po: DiagnosticCommonKinds.inc.h
+ParseExpr.po: DiagnosticParseKinds.inc.h
+ParseExpr.po: StmtNodes.inc.h
+ParseExprCXX.o: AttrList.inc.h
+ParseExprCXX.o: AttrParsedAttrList.inc.h
+ParseExprCXX.o: Attrs.inc.h
+ParseExprCXX.o: DeclNodes.inc.h
+ParseExprCXX.o: DiagnosticCommonKinds.inc.h
+ParseExprCXX.o: DiagnosticParseKinds.inc.h
+ParseExprCXX.o: StmtNodes.inc.h
+ParseExprCXX.po: AttrList.inc.h
+ParseExprCXX.po: AttrParsedAttrList.inc.h
+ParseExprCXX.po: Attrs.inc.h
+ParseExprCXX.po: DeclNodes.inc.h
+ParseExprCXX.po: DiagnosticCommonKinds.inc.h
+ParseExprCXX.po: DiagnosticParseKinds.inc.h
+ParseExprCXX.po: StmtNodes.inc.h
+ParseInit.o: AttrList.inc.h
+ParseInit.o: AttrParsedAttrList.inc.h
+ParseInit.o: Attrs.inc.h
+ParseInit.o: DeclNodes.inc.h
+ParseInit.o: DiagnosticCommonKinds.inc.h
+ParseInit.o: DiagnosticParseKinds.inc.h
+ParseInit.o: StmtNodes.inc.h
+ParseInit.po: AttrList.inc.h
+ParseInit.po: AttrParsedAttrList.inc.h
+ParseInit.po: Attrs.inc.h
+ParseInit.po: DeclNodes.inc.h
+ParseInit.po: DiagnosticCommonKinds.inc.h
+ParseInit.po: DiagnosticParseKinds.inc.h
+ParseInit.po: StmtNodes.inc.h
+ParseObjc.o: AttrList.inc.h
+ParseObjc.o: AttrParsedAttrList.inc.h
+ParseObjc.o: Attrs.inc.h
+ParseObjc.o: DeclNodes.inc.h
+ParseObjc.o: DiagnosticCommonKinds.inc.h
+ParseObjc.o: DiagnosticParseKinds.inc.h
+ParseObjc.o: StmtNodes.inc.h
+ParseObjc.po: AttrList.inc.h
+ParseObjc.po: AttrParsedAttrList.inc.h
+ParseObjc.po: Attrs.inc.h
+ParseObjc.po: DeclNodes.inc.h
+ParseObjc.po: DiagnosticCommonKinds.inc.h
+ParseObjc.po: DiagnosticParseKinds.inc.h
+ParseObjc.po: StmtNodes.inc.h
+ParsePragma.o: AttrList.inc.h
+ParsePragma.o: AttrParsedAttrList.inc.h
+ParsePragma.o: Attrs.inc.h
+ParsePragma.o: DeclNodes.inc.h
+ParsePragma.o: DiagnosticCommonKinds.inc.h
+ParsePragma.o: DiagnosticParseKinds.inc.h
+ParsePragma.o: StmtNodes.inc.h
+ParsePragma.po: AttrList.inc.h
+ParsePragma.po: AttrParsedAttrList.inc.h
+ParsePragma.po: Attrs.inc.h
+ParsePragma.po: DeclNodes.inc.h
+ParsePragma.po: DiagnosticCommonKinds.inc.h
+ParsePragma.po: DiagnosticParseKinds.inc.h
+ParsePragma.po: StmtNodes.inc.h
+ParseStmt.o: AttrList.inc.h
+ParseStmt.o: AttrParsedAttrList.inc.h
+ParseStmt.o: Attrs.inc.h
+ParseStmt.o: DeclNodes.inc.h
+ParseStmt.o: DiagnosticCommonKinds.inc.h
+ParseStmt.o: DiagnosticParseKinds.inc.h
+ParseStmt.o: StmtNodes.inc.h
+ParseStmt.po: AttrList.inc.h
+ParseStmt.po: AttrParsedAttrList.inc.h
+ParseStmt.po: Attrs.inc.h
+ParseStmt.po: DeclNodes.inc.h
+ParseStmt.po: DiagnosticCommonKinds.inc.h
+ParseStmt.po: DiagnosticParseKinds.inc.h
+ParseStmt.po: StmtNodes.inc.h
+ParseTemplate.o: AttrList.inc.h
+ParseTemplate.o: AttrParsedAttrList.inc.h
+ParseTemplate.o: Attrs.inc.h
+ParseTemplate.o: DeclNodes.inc.h
+ParseTemplate.o: DiagnosticCommonKinds.inc.h
+ParseTemplate.o: DiagnosticParseKinds.inc.h
+ParseTemplate.o: StmtNodes.inc.h
+ParseTemplate.po: AttrList.inc.h
+ParseTemplate.po: AttrParsedAttrList.inc.h
+ParseTemplate.po: Attrs.inc.h
+ParseTemplate.po: DeclNodes.inc.h
+ParseTemplate.po: DiagnosticCommonKinds.inc.h
+ParseTemplate.po: DiagnosticParseKinds.inc.h
+ParseTemplate.po: StmtNodes.inc.h
+ParseTentative.o: AttrList.inc.h
+ParseTentative.o: AttrParsedAttrList.inc.h
+ParseTentative.o: Attrs.inc.h
+ParseTentative.o: DeclNodes.inc.h
+ParseTentative.o: DiagnosticCommonKinds.inc.h
+ParseTentative.o: DiagnosticParseKinds.inc.h
+ParseTentative.o: StmtNodes.inc.h
+ParseTentative.po: AttrList.inc.h
+ParseTentative.po: AttrParsedAttrList.inc.h
+ParseTentative.po: Attrs.inc.h
+ParseTentative.po: DeclNodes.inc.h
+ParseTentative.po: DiagnosticCommonKinds.inc.h
+ParseTentative.po: DiagnosticParseKinds.inc.h
+ParseTentative.po: StmtNodes.inc.h
+Parser.o: AttrList.inc.h
+Parser.o: AttrParsedAttrList.inc.h
+Parser.o: Attrs.inc.h
+Parser.o: DeclNodes.inc.h
+Parser.o: DiagnosticCommonKinds.inc.h
+Parser.o: DiagnosticParseKinds.inc.h
+Parser.o: StmtNodes.inc.h
+Parser.po: AttrList.inc.h
+Parser.po: AttrParsedAttrList.inc.h
+Parser.po: Attrs.inc.h
+Parser.po: DeclNodes.inc.h
+Parser.po: DiagnosticCommonKinds.inc.h
+Parser.po: DiagnosticParseKinds.inc.h
+Parser.po: StmtNodes.inc.h
+.endif
diff --git a/lib/clang/libclangrewrite/Makefile b/lib/clang/libclangrewrite/Makefile
index 3150b56..e165b0b 100644
--- a/lib/clang/libclangrewrite/Makefile
+++ b/lib/clang/libclangrewrite/Makefile
@@ -8,6 +8,7 @@ SRCS= DeltaTree.cpp \
FrontendActions.cpp \
HTMLPrint.cpp \
HTMLRewrite.cpp \
+ InclusionRewriter.cpp \
RewriteMacros.cpp \
RewriteModernObjC.cpp \
RewriteObjC.cpp \
@@ -19,6 +20,7 @@ SRCS= DeltaTree.cpp \
TGHDRS= AttrList \
AttrParsedAttrList \
Attrs \
+ CommentNodes \
DeclNodes \
DiagnosticCommonKinds \
DiagnosticFrontendKinds \
diff --git a/lib/clang/libclangrewrite/Makefile.depend b/lib/clang/libclangrewrite/Makefile.depend
new file mode 100644
index 0000000..ea0e441
--- /dev/null
+++ b/lib/clang/libclangrewrite/Makefile.depend
@@ -0,0 +1,79 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+FixItRewriter.o: DiagnosticCommonKinds.inc.h
+FixItRewriter.o: DiagnosticFrontendKinds.inc.h
+FixItRewriter.po: DiagnosticCommonKinds.inc.h
+FixItRewriter.po: DiagnosticFrontendKinds.inc.h
+FrontendActions.o: AttrList.inc.h
+FrontendActions.o: AttrParsedAttrList.inc.h
+FrontendActions.o: Attrs.inc.h
+FrontendActions.o: DeclNodes.inc.h
+FrontendActions.o: DiagnosticCommonKinds.inc.h
+FrontendActions.o: DiagnosticFrontendKinds.inc.h
+FrontendActions.o: StmtNodes.inc.h
+FrontendActions.po: AttrList.inc.h
+FrontendActions.po: AttrParsedAttrList.inc.h
+FrontendActions.po: Attrs.inc.h
+FrontendActions.po: DeclNodes.inc.h
+FrontendActions.po: DiagnosticCommonKinds.inc.h
+FrontendActions.po: DiagnosticFrontendKinds.inc.h
+FrontendActions.po: StmtNodes.inc.h
+HTMLPrint.o: AttrList.inc.h
+HTMLPrint.o: Attrs.inc.h
+HTMLPrint.o: DeclNodes.inc.h
+HTMLPrint.o: DiagnosticCommonKinds.inc.h
+HTMLPrint.po: AttrList.inc.h
+HTMLPrint.po: Attrs.inc.h
+HTMLPrint.po: DeclNodes.inc.h
+HTMLPrint.po: DiagnosticCommonKinds.inc.h
+HTMLRewrite.o: DiagnosticCommonKinds.inc.h
+HTMLRewrite.po: DiagnosticCommonKinds.inc.h
+RewriteMacros.o: DiagnosticCommonKinds.inc.h
+RewriteMacros.po: DiagnosticCommonKinds.inc.h
+RewriteModernObjC.o: AttrList.inc.h
+RewriteModernObjC.o: Attrs.inc.h
+RewriteModernObjC.o: DeclNodes.inc.h
+RewriteModernObjC.o: DiagnosticCommonKinds.inc.h
+RewriteModernObjC.o: StmtNodes.inc.h
+RewriteModernObjC.po: AttrList.inc.h
+RewriteModernObjC.po: Attrs.inc.h
+RewriteModernObjC.po: DeclNodes.inc.h
+RewriteModernObjC.po: DiagnosticCommonKinds.inc.h
+RewriteModernObjC.po: StmtNodes.inc.h
+RewriteObjC.o: AttrList.inc.h
+RewriteObjC.o: Attrs.inc.h
+RewriteObjC.o: DeclNodes.inc.h
+RewriteObjC.o: DiagnosticCommonKinds.inc.h
+RewriteObjC.o: StmtNodes.inc.h
+RewriteObjC.po: AttrList.inc.h
+RewriteObjC.po: Attrs.inc.h
+RewriteObjC.po: DeclNodes.inc.h
+RewriteObjC.po: DiagnosticCommonKinds.inc.h
+RewriteObjC.po: StmtNodes.inc.h
+RewriteTest.o: DiagnosticCommonKinds.inc.h
+RewriteTest.po: DiagnosticCommonKinds.inc.h
+Rewriter.o: AttrList.inc.h
+Rewriter.o: Attrs.inc.h
+Rewriter.o: DeclNodes.inc.h
+Rewriter.o: DiagnosticCommonKinds.inc.h
+Rewriter.o: StmtNodes.inc.h
+Rewriter.po: AttrList.inc.h
+Rewriter.po: Attrs.inc.h
+Rewriter.po: DeclNodes.inc.h
+Rewriter.po: DiagnosticCommonKinds.inc.h
+Rewriter.po: StmtNodes.inc.h
+.endif
diff --git a/lib/clang/libclangsema/Makefile b/lib/clang/libclangsema/Makefile
index 3b2b331..83a1c56 100644
--- a/lib/clang/libclangsema/Makefile
+++ b/lib/clang/libclangsema/Makefile
@@ -50,8 +50,10 @@ TGHDRS= AttrList \
AttrParsedAttrList \
AttrTemplateInstantiate \
Attrs \
+ CommentNodes \
DeclNodes \
DiagnosticASTKinds \
+ DiagnosticCommentKinds \
DiagnosticCommonKinds \
DiagnosticParseKinds \
DiagnosticSemaKinds \
diff --git a/lib/clang/libclangsema/Makefile.depend b/lib/clang/libclangsema/Makefile.depend
new file mode 100644
index 0000000..d33e42f
--- /dev/null
+++ b/lib/clang/libclangsema/Makefile.depend
@@ -0,0 +1,563 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+AnalysisBasedWarnings.o: AttrList.inc.h
+AnalysisBasedWarnings.o: AttrParsedAttrList.inc.h
+AnalysisBasedWarnings.o: Attrs.inc.h
+AnalysisBasedWarnings.o: DeclNodes.inc.h
+AnalysisBasedWarnings.o: DiagnosticCommonKinds.inc.h
+AnalysisBasedWarnings.o: DiagnosticSemaKinds.inc.h
+AnalysisBasedWarnings.o: StmtNodes.inc.h
+AnalysisBasedWarnings.po: AttrList.inc.h
+AnalysisBasedWarnings.po: AttrParsedAttrList.inc.h
+AnalysisBasedWarnings.po: Attrs.inc.h
+AnalysisBasedWarnings.po: DeclNodes.inc.h
+AnalysisBasedWarnings.po: DiagnosticCommonKinds.inc.h
+AnalysisBasedWarnings.po: DiagnosticSemaKinds.inc.h
+AnalysisBasedWarnings.po: StmtNodes.inc.h
+AttributeList.o: AttrList.inc.h
+AttributeList.o: AttrParsedAttrKinds.inc.h
+AttributeList.o: AttrParsedAttrList.inc.h
+AttributeList.o: Attrs.inc.h
+AttributeList.o: DeclNodes.inc.h
+AttributeList.o: DiagnosticCommonKinds.inc.h
+AttributeList.o: StmtNodes.inc.h
+AttributeList.po: AttrList.inc.h
+AttributeList.po: AttrParsedAttrKinds.inc.h
+AttributeList.po: AttrParsedAttrList.inc.h
+AttributeList.po: Attrs.inc.h
+AttributeList.po: DeclNodes.inc.h
+AttributeList.po: DiagnosticCommonKinds.inc.h
+AttributeList.po: StmtNodes.inc.h
+CodeCompleteConsumer.o: AttrList.inc.h
+CodeCompleteConsumer.o: AttrParsedAttrList.inc.h
+CodeCompleteConsumer.o: Attrs.inc.h
+CodeCompleteConsumer.o: DeclNodes.inc.h
+CodeCompleteConsumer.o: DiagnosticCommonKinds.inc.h
+CodeCompleteConsumer.o: StmtNodes.inc.h
+CodeCompleteConsumer.po: AttrList.inc.h
+CodeCompleteConsumer.po: AttrParsedAttrList.inc.h
+CodeCompleteConsumer.po: Attrs.inc.h
+CodeCompleteConsumer.po: DeclNodes.inc.h
+CodeCompleteConsumer.po: DiagnosticCommonKinds.inc.h
+CodeCompleteConsumer.po: StmtNodes.inc.h
+DeclSpec.o: AttrList.inc.h
+DeclSpec.o: AttrParsedAttrList.inc.h
+DeclSpec.o: Attrs.inc.h
+DeclSpec.o: DeclNodes.inc.h
+DeclSpec.o: DiagnosticCommonKinds.inc.h
+DeclSpec.o: DiagnosticParseKinds.inc.h
+DeclSpec.o: DiagnosticSemaKinds.inc.h
+DeclSpec.o: StmtNodes.inc.h
+DeclSpec.po: AttrList.inc.h
+DeclSpec.po: AttrParsedAttrList.inc.h
+DeclSpec.po: Attrs.inc.h
+DeclSpec.po: DeclNodes.inc.h
+DeclSpec.po: DiagnosticCommonKinds.inc.h
+DeclSpec.po: DiagnosticParseKinds.inc.h
+DeclSpec.po: DiagnosticSemaKinds.inc.h
+DeclSpec.po: StmtNodes.inc.h
+DelayedDiagnostic.o: AttrList.inc.h
+DelayedDiagnostic.o: Attrs.inc.h
+DelayedDiagnostic.o: DeclNodes.inc.h
+DelayedDiagnostic.o: DiagnosticCommonKinds.inc.h
+DelayedDiagnostic.o: StmtNodes.inc.h
+DelayedDiagnostic.po: AttrList.inc.h
+DelayedDiagnostic.po: Attrs.inc.h
+DelayedDiagnostic.po: DeclNodes.inc.h
+DelayedDiagnostic.po: DiagnosticCommonKinds.inc.h
+DelayedDiagnostic.po: StmtNodes.inc.h
+IdentifierResolver.o: AttrList.inc.h
+IdentifierResolver.o: Attrs.inc.h
+IdentifierResolver.o: DeclNodes.inc.h
+IdentifierResolver.o: DiagnosticCommonKinds.inc.h
+IdentifierResolver.po: AttrList.inc.h
+IdentifierResolver.po: Attrs.inc.h
+IdentifierResolver.po: DeclNodes.inc.h
+IdentifierResolver.po: DiagnosticCommonKinds.inc.h
+JumpDiagnostics.o: AttrList.inc.h
+JumpDiagnostics.o: AttrParsedAttrList.inc.h
+JumpDiagnostics.o: Attrs.inc.h
+JumpDiagnostics.o: DeclNodes.inc.h
+JumpDiagnostics.o: DiagnosticCommonKinds.inc.h
+JumpDiagnostics.o: DiagnosticSemaKinds.inc.h
+JumpDiagnostics.o: StmtNodes.inc.h
+JumpDiagnostics.po: AttrList.inc.h
+JumpDiagnostics.po: AttrParsedAttrList.inc.h
+JumpDiagnostics.po: Attrs.inc.h
+JumpDiagnostics.po: DeclNodes.inc.h
+JumpDiagnostics.po: DiagnosticCommonKinds.inc.h
+JumpDiagnostics.po: DiagnosticSemaKinds.inc.h
+JumpDiagnostics.po: StmtNodes.inc.h
+Scope.o: DiagnosticCommonKinds.inc.h
+Scope.po: DiagnosticCommonKinds.inc.h
+Sema.o: AttrList.inc.h
+Sema.o: AttrParsedAttrList.inc.h
+Sema.o: Attrs.inc.h
+Sema.o: DeclNodes.inc.h
+Sema.o: DiagnosticASTKinds.inc.h
+Sema.o: DiagnosticCommonKinds.inc.h
+Sema.o: DiagnosticSemaKinds.inc.h
+Sema.o: StmtNodes.inc.h
+Sema.po: AttrList.inc.h
+Sema.po: AttrParsedAttrList.inc.h
+Sema.po: Attrs.inc.h
+Sema.po: DeclNodes.inc.h
+Sema.po: DiagnosticASTKinds.inc.h
+Sema.po: DiagnosticCommonKinds.inc.h
+Sema.po: DiagnosticSemaKinds.inc.h
+Sema.po: StmtNodes.inc.h
+SemaAccess.o: AttrList.inc.h
+SemaAccess.o: AttrParsedAttrList.inc.h
+SemaAccess.o: Attrs.inc.h
+SemaAccess.o: DeclNodes.inc.h
+SemaAccess.o: DiagnosticCommonKinds.inc.h
+SemaAccess.o: DiagnosticSemaKinds.inc.h
+SemaAccess.o: StmtNodes.inc.h
+SemaAccess.po: AttrList.inc.h
+SemaAccess.po: AttrParsedAttrList.inc.h
+SemaAccess.po: Attrs.inc.h
+SemaAccess.po: DeclNodes.inc.h
+SemaAccess.po: DiagnosticCommonKinds.inc.h
+SemaAccess.po: DiagnosticSemaKinds.inc.h
+SemaAccess.po: StmtNodes.inc.h
+SemaAttr.o: AttrList.inc.h
+SemaAttr.o: AttrParsedAttrList.inc.h
+SemaAttr.o: Attrs.inc.h
+SemaAttr.o: DeclNodes.inc.h
+SemaAttr.o: DiagnosticCommonKinds.inc.h
+SemaAttr.o: DiagnosticSemaKinds.inc.h
+SemaAttr.o: StmtNodes.inc.h
+SemaAttr.po: AttrList.inc.h
+SemaAttr.po: AttrParsedAttrList.inc.h
+SemaAttr.po: Attrs.inc.h
+SemaAttr.po: DeclNodes.inc.h
+SemaAttr.po: DiagnosticCommonKinds.inc.h
+SemaAttr.po: DiagnosticSemaKinds.inc.h
+SemaAttr.po: StmtNodes.inc.h
+SemaCXXScopeSpec.o: AttrList.inc.h
+SemaCXXScopeSpec.o: AttrParsedAttrList.inc.h
+SemaCXXScopeSpec.o: Attrs.inc.h
+SemaCXXScopeSpec.o: DeclNodes.inc.h
+SemaCXXScopeSpec.o: DiagnosticCommonKinds.inc.h
+SemaCXXScopeSpec.o: DiagnosticSemaKinds.inc.h
+SemaCXXScopeSpec.o: StmtNodes.inc.h
+SemaCXXScopeSpec.po: AttrList.inc.h
+SemaCXXScopeSpec.po: AttrParsedAttrList.inc.h
+SemaCXXScopeSpec.po: Attrs.inc.h
+SemaCXXScopeSpec.po: DeclNodes.inc.h
+SemaCXXScopeSpec.po: DiagnosticCommonKinds.inc.h
+SemaCXXScopeSpec.po: DiagnosticSemaKinds.inc.h
+SemaCXXScopeSpec.po: StmtNodes.inc.h
+SemaCast.o: AttrList.inc.h
+SemaCast.o: AttrParsedAttrList.inc.h
+SemaCast.o: Attrs.inc.h
+SemaCast.o: DeclNodes.inc.h
+SemaCast.o: DiagnosticCommonKinds.inc.h
+SemaCast.o: DiagnosticSemaKinds.inc.h
+SemaCast.o: StmtNodes.inc.h
+SemaCast.po: AttrList.inc.h
+SemaCast.po: AttrParsedAttrList.inc.h
+SemaCast.po: Attrs.inc.h
+SemaCast.po: DeclNodes.inc.h
+SemaCast.po: DiagnosticCommonKinds.inc.h
+SemaCast.po: DiagnosticSemaKinds.inc.h
+SemaCast.po: StmtNodes.inc.h
+SemaChecking.o: AttrList.inc.h
+SemaChecking.o: AttrParsedAttrList.inc.h
+SemaChecking.o: Attrs.inc.h
+SemaChecking.o: DeclNodes.inc.h
+SemaChecking.o: DiagnosticCommonKinds.inc.h
+SemaChecking.o: DiagnosticSemaKinds.inc.h
+SemaChecking.o: StmtNodes.inc.h
+SemaChecking.o: arm_neon.inc.h
+SemaChecking.po: AttrList.inc.h
+SemaChecking.po: AttrParsedAttrList.inc.h
+SemaChecking.po: Attrs.inc.h
+SemaChecking.po: DeclNodes.inc.h
+SemaChecking.po: DiagnosticCommonKinds.inc.h
+SemaChecking.po: DiagnosticSemaKinds.inc.h
+SemaChecking.po: StmtNodes.inc.h
+SemaChecking.po: arm_neon.inc.h
+SemaCodeComplete.o: AttrList.inc.h
+SemaCodeComplete.o: AttrParsedAttrList.inc.h
+SemaCodeComplete.o: Attrs.inc.h
+SemaCodeComplete.o: DeclNodes.inc.h
+SemaCodeComplete.o: DiagnosticCommonKinds.inc.h
+SemaCodeComplete.o: DiagnosticSemaKinds.inc.h
+SemaCodeComplete.o: StmtNodes.inc.h
+SemaCodeComplete.po: AttrList.inc.h
+SemaCodeComplete.po: AttrParsedAttrList.inc.h
+SemaCodeComplete.po: Attrs.inc.h
+SemaCodeComplete.po: DeclNodes.inc.h
+SemaCodeComplete.po: DiagnosticCommonKinds.inc.h
+SemaCodeComplete.po: DiagnosticSemaKinds.inc.h
+SemaCodeComplete.po: StmtNodes.inc.h
+SemaDecl.o: AttrList.inc.h
+SemaDecl.o: AttrParsedAttrList.inc.h
+SemaDecl.o: Attrs.inc.h
+SemaDecl.o: DeclNodes.inc.h
+SemaDecl.o: DiagnosticCommonKinds.inc.h
+SemaDecl.o: DiagnosticParseKinds.inc.h
+SemaDecl.o: DiagnosticSemaKinds.inc.h
+SemaDecl.o: StmtNodes.inc.h
+SemaDecl.po: AttrList.inc.h
+SemaDecl.po: AttrParsedAttrList.inc.h
+SemaDecl.po: Attrs.inc.h
+SemaDecl.po: DeclNodes.inc.h
+SemaDecl.po: DiagnosticCommonKinds.inc.h
+SemaDecl.po: DiagnosticParseKinds.inc.h
+SemaDecl.po: DiagnosticSemaKinds.inc.h
+SemaDecl.po: StmtNodes.inc.h
+SemaDeclAttr.o: AttrList.inc.h
+SemaDeclAttr.o: AttrParsedAttrList.inc.h
+SemaDeclAttr.o: Attrs.inc.h
+SemaDeclAttr.o: DeclNodes.inc.h
+SemaDeclAttr.o: DiagnosticCommonKinds.inc.h
+SemaDeclAttr.o: DiagnosticSemaKinds.inc.h
+SemaDeclAttr.o: StmtNodes.inc.h
+SemaDeclAttr.po: AttrList.inc.h
+SemaDeclAttr.po: AttrParsedAttrList.inc.h
+SemaDeclAttr.po: Attrs.inc.h
+SemaDeclAttr.po: DeclNodes.inc.h
+SemaDeclAttr.po: DiagnosticCommonKinds.inc.h
+SemaDeclAttr.po: DiagnosticSemaKinds.inc.h
+SemaDeclAttr.po: StmtNodes.inc.h
+SemaDeclCXX.o: AttrList.inc.h
+SemaDeclCXX.o: AttrParsedAttrList.inc.h
+SemaDeclCXX.o: Attrs.inc.h
+SemaDeclCXX.o: DeclNodes.inc.h
+SemaDeclCXX.o: DiagnosticCommonKinds.inc.h
+SemaDeclCXX.o: DiagnosticSemaKinds.inc.h
+SemaDeclCXX.o: StmtNodes.inc.h
+SemaDeclCXX.po: AttrList.inc.h
+SemaDeclCXX.po: AttrParsedAttrList.inc.h
+SemaDeclCXX.po: Attrs.inc.h
+SemaDeclCXX.po: DeclNodes.inc.h
+SemaDeclCXX.po: DiagnosticCommonKinds.inc.h
+SemaDeclCXX.po: DiagnosticSemaKinds.inc.h
+SemaDeclCXX.po: StmtNodes.inc.h
+SemaDeclObjC.o: AttrList.inc.h
+SemaDeclObjC.o: AttrParsedAttrList.inc.h
+SemaDeclObjC.o: Attrs.inc.h
+SemaDeclObjC.o: DeclNodes.inc.h
+SemaDeclObjC.o: DiagnosticCommonKinds.inc.h
+SemaDeclObjC.o: DiagnosticSemaKinds.inc.h
+SemaDeclObjC.o: StmtNodes.inc.h
+SemaDeclObjC.po: AttrList.inc.h
+SemaDeclObjC.po: AttrParsedAttrList.inc.h
+SemaDeclObjC.po: Attrs.inc.h
+SemaDeclObjC.po: DeclNodes.inc.h
+SemaDeclObjC.po: DiagnosticCommonKinds.inc.h
+SemaDeclObjC.po: DiagnosticSemaKinds.inc.h
+SemaDeclObjC.po: StmtNodes.inc.h
+SemaExceptionSpec.o: AttrList.inc.h
+SemaExceptionSpec.o: AttrParsedAttrList.inc.h
+SemaExceptionSpec.o: Attrs.inc.h
+SemaExceptionSpec.o: DeclNodes.inc.h
+SemaExceptionSpec.o: DiagnosticCommonKinds.inc.h
+SemaExceptionSpec.o: DiagnosticSemaKinds.inc.h
+SemaExceptionSpec.o: StmtNodes.inc.h
+SemaExceptionSpec.po: AttrList.inc.h
+SemaExceptionSpec.po: AttrParsedAttrList.inc.h
+SemaExceptionSpec.po: Attrs.inc.h
+SemaExceptionSpec.po: DeclNodes.inc.h
+SemaExceptionSpec.po: DiagnosticCommonKinds.inc.h
+SemaExceptionSpec.po: DiagnosticSemaKinds.inc.h
+SemaExceptionSpec.po: StmtNodes.inc.h
+SemaExpr.o: AttrList.inc.h
+SemaExpr.o: AttrParsedAttrList.inc.h
+SemaExpr.o: Attrs.inc.h
+SemaExpr.o: DeclNodes.inc.h
+SemaExpr.o: DiagnosticCommonKinds.inc.h
+SemaExpr.o: DiagnosticSemaKinds.inc.h
+SemaExpr.o: StmtNodes.inc.h
+SemaExpr.po: AttrList.inc.h
+SemaExpr.po: AttrParsedAttrList.inc.h
+SemaExpr.po: Attrs.inc.h
+SemaExpr.po: DeclNodes.inc.h
+SemaExpr.po: DiagnosticCommonKinds.inc.h
+SemaExpr.po: DiagnosticSemaKinds.inc.h
+SemaExpr.po: StmtNodes.inc.h
+SemaExprCXX.o: AttrList.inc.h
+SemaExprCXX.o: AttrParsedAttrList.inc.h
+SemaExprCXX.o: Attrs.inc.h
+SemaExprCXX.o: DeclNodes.inc.h
+SemaExprCXX.o: DiagnosticCommonKinds.inc.h
+SemaExprCXX.o: DiagnosticSemaKinds.inc.h
+SemaExprCXX.o: StmtNodes.inc.h
+SemaExprCXX.po: AttrList.inc.h
+SemaExprCXX.po: AttrParsedAttrList.inc.h
+SemaExprCXX.po: Attrs.inc.h
+SemaExprCXX.po: DeclNodes.inc.h
+SemaExprCXX.po: DiagnosticCommonKinds.inc.h
+SemaExprCXX.po: DiagnosticSemaKinds.inc.h
+SemaExprCXX.po: StmtNodes.inc.h
+SemaExprMember.o: AttrList.inc.h
+SemaExprMember.o: AttrParsedAttrList.inc.h
+SemaExprMember.o: Attrs.inc.h
+SemaExprMember.o: DeclNodes.inc.h
+SemaExprMember.o: DiagnosticCommonKinds.inc.h
+SemaExprMember.o: DiagnosticSemaKinds.inc.h
+SemaExprMember.o: StmtNodes.inc.h
+SemaExprMember.po: AttrList.inc.h
+SemaExprMember.po: AttrParsedAttrList.inc.h
+SemaExprMember.po: Attrs.inc.h
+SemaExprMember.po: DeclNodes.inc.h
+SemaExprMember.po: DiagnosticCommonKinds.inc.h
+SemaExprMember.po: DiagnosticSemaKinds.inc.h
+SemaExprMember.po: StmtNodes.inc.h
+SemaExprObjC.o: AttrList.inc.h
+SemaExprObjC.o: AttrParsedAttrList.inc.h
+SemaExprObjC.o: Attrs.inc.h
+SemaExprObjC.o: DeclNodes.inc.h
+SemaExprObjC.o: DiagnosticCommonKinds.inc.h
+SemaExprObjC.o: DiagnosticSemaKinds.inc.h
+SemaExprObjC.o: StmtNodes.inc.h
+SemaExprObjC.po: AttrList.inc.h
+SemaExprObjC.po: AttrParsedAttrList.inc.h
+SemaExprObjC.po: Attrs.inc.h
+SemaExprObjC.po: DeclNodes.inc.h
+SemaExprObjC.po: DiagnosticCommonKinds.inc.h
+SemaExprObjC.po: DiagnosticSemaKinds.inc.h
+SemaExprObjC.po: StmtNodes.inc.h
+SemaFixItUtils.o: AttrList.inc.h
+SemaFixItUtils.o: AttrParsedAttrList.inc.h
+SemaFixItUtils.o: Attrs.inc.h
+SemaFixItUtils.o: DeclNodes.inc.h
+SemaFixItUtils.o: DiagnosticCommonKinds.inc.h
+SemaFixItUtils.o: StmtNodes.inc.h
+SemaFixItUtils.po: AttrList.inc.h
+SemaFixItUtils.po: AttrParsedAttrList.inc.h
+SemaFixItUtils.po: Attrs.inc.h
+SemaFixItUtils.po: DeclNodes.inc.h
+SemaFixItUtils.po: DiagnosticCommonKinds.inc.h
+SemaFixItUtils.po: StmtNodes.inc.h
+SemaInit.o: AttrList.inc.h
+SemaInit.o: AttrParsedAttrList.inc.h
+SemaInit.o: Attrs.inc.h
+SemaInit.o: DeclNodes.inc.h
+SemaInit.o: DiagnosticCommonKinds.inc.h
+SemaInit.o: DiagnosticSemaKinds.inc.h
+SemaInit.o: StmtNodes.inc.h
+SemaInit.po: AttrList.inc.h
+SemaInit.po: AttrParsedAttrList.inc.h
+SemaInit.po: Attrs.inc.h
+SemaInit.po: DeclNodes.inc.h
+SemaInit.po: DiagnosticCommonKinds.inc.h
+SemaInit.po: DiagnosticSemaKinds.inc.h
+SemaInit.po: StmtNodes.inc.h
+SemaLambda.o: AttrList.inc.h
+SemaLambda.o: AttrParsedAttrList.inc.h
+SemaLambda.o: Attrs.inc.h
+SemaLambda.o: DeclNodes.inc.h
+SemaLambda.o: DiagnosticCommonKinds.inc.h
+SemaLambda.o: DiagnosticSemaKinds.inc.h
+SemaLambda.o: StmtNodes.inc.h
+SemaLambda.po: AttrList.inc.h
+SemaLambda.po: AttrParsedAttrList.inc.h
+SemaLambda.po: Attrs.inc.h
+SemaLambda.po: DeclNodes.inc.h
+SemaLambda.po: DiagnosticCommonKinds.inc.h
+SemaLambda.po: DiagnosticSemaKinds.inc.h
+SemaLambda.po: StmtNodes.inc.h
+SemaLookup.o: AttrList.inc.h
+SemaLookup.o: AttrParsedAttrList.inc.h
+SemaLookup.o: Attrs.inc.h
+SemaLookup.o: DeclNodes.inc.h
+SemaLookup.o: DiagnosticCommonKinds.inc.h
+SemaLookup.o: DiagnosticSemaKinds.inc.h
+SemaLookup.o: StmtNodes.inc.h
+SemaLookup.po: AttrList.inc.h
+SemaLookup.po: AttrParsedAttrList.inc.h
+SemaLookup.po: Attrs.inc.h
+SemaLookup.po: DeclNodes.inc.h
+SemaLookup.po: DiagnosticCommonKinds.inc.h
+SemaLookup.po: DiagnosticSemaKinds.inc.h
+SemaLookup.po: StmtNodes.inc.h
+SemaObjCProperty.o: AttrList.inc.h
+SemaObjCProperty.o: AttrParsedAttrList.inc.h
+SemaObjCProperty.o: Attrs.inc.h
+SemaObjCProperty.o: DeclNodes.inc.h
+SemaObjCProperty.o: DiagnosticCommonKinds.inc.h
+SemaObjCProperty.o: DiagnosticSemaKinds.inc.h
+SemaObjCProperty.o: StmtNodes.inc.h
+SemaObjCProperty.po: AttrList.inc.h
+SemaObjCProperty.po: AttrParsedAttrList.inc.h
+SemaObjCProperty.po: Attrs.inc.h
+SemaObjCProperty.po: DeclNodes.inc.h
+SemaObjCProperty.po: DiagnosticCommonKinds.inc.h
+SemaObjCProperty.po: DiagnosticSemaKinds.inc.h
+SemaObjCProperty.po: StmtNodes.inc.h
+SemaOverload.o: AttrList.inc.h
+SemaOverload.o: AttrParsedAttrList.inc.h
+SemaOverload.o: Attrs.inc.h
+SemaOverload.o: DeclNodes.inc.h
+SemaOverload.o: DiagnosticCommonKinds.inc.h
+SemaOverload.o: DiagnosticSemaKinds.inc.h
+SemaOverload.o: StmtNodes.inc.h
+SemaOverload.po: AttrList.inc.h
+SemaOverload.po: AttrParsedAttrList.inc.h
+SemaOverload.po: Attrs.inc.h
+SemaOverload.po: DeclNodes.inc.h
+SemaOverload.po: DiagnosticCommonKinds.inc.h
+SemaOverload.po: DiagnosticSemaKinds.inc.h
+SemaOverload.po: StmtNodes.inc.h
+SemaPseudoObject.o: AttrList.inc.h
+SemaPseudoObject.o: AttrParsedAttrList.inc.h
+SemaPseudoObject.o: Attrs.inc.h
+SemaPseudoObject.o: DeclNodes.inc.h
+SemaPseudoObject.o: DiagnosticCommonKinds.inc.h
+SemaPseudoObject.o: DiagnosticSemaKinds.inc.h
+SemaPseudoObject.o: StmtNodes.inc.h
+SemaPseudoObject.po: AttrList.inc.h
+SemaPseudoObject.po: AttrParsedAttrList.inc.h
+SemaPseudoObject.po: Attrs.inc.h
+SemaPseudoObject.po: DeclNodes.inc.h
+SemaPseudoObject.po: DiagnosticCommonKinds.inc.h
+SemaPseudoObject.po: DiagnosticSemaKinds.inc.h
+SemaPseudoObject.po: StmtNodes.inc.h
+SemaStmt.o: AttrList.inc.h
+SemaStmt.o: AttrParsedAttrList.inc.h
+SemaStmt.o: Attrs.inc.h
+SemaStmt.o: DeclNodes.inc.h
+SemaStmt.o: DiagnosticCommonKinds.inc.h
+SemaStmt.o: DiagnosticSemaKinds.inc.h
+SemaStmt.o: StmtNodes.inc.h
+SemaStmt.po: AttrList.inc.h
+SemaStmt.po: AttrParsedAttrList.inc.h
+SemaStmt.po: Attrs.inc.h
+SemaStmt.po: DeclNodes.inc.h
+SemaStmt.po: DiagnosticCommonKinds.inc.h
+SemaStmt.po: DiagnosticSemaKinds.inc.h
+SemaStmt.po: StmtNodes.inc.h
+SemaStmtAttr.o: AttrList.inc.h
+SemaStmtAttr.o: AttrParsedAttrList.inc.h
+SemaStmtAttr.o: Attrs.inc.h
+SemaStmtAttr.o: DeclNodes.inc.h
+SemaStmtAttr.o: DiagnosticCommonKinds.inc.h
+SemaStmtAttr.o: DiagnosticSemaKinds.inc.h
+SemaStmtAttr.o: StmtNodes.inc.h
+SemaStmtAttr.po: AttrList.inc.h
+SemaStmtAttr.po: AttrParsedAttrList.inc.h
+SemaStmtAttr.po: Attrs.inc.h
+SemaStmtAttr.po: DeclNodes.inc.h
+SemaStmtAttr.po: DiagnosticCommonKinds.inc.h
+SemaStmtAttr.po: DiagnosticSemaKinds.inc.h
+SemaStmtAttr.po: StmtNodes.inc.h
+SemaTemplate.o: AttrList.inc.h
+SemaTemplate.o: AttrParsedAttrList.inc.h
+SemaTemplate.o: Attrs.inc.h
+SemaTemplate.o: DeclNodes.inc.h
+SemaTemplate.o: DiagnosticCommonKinds.inc.h
+SemaTemplate.o: DiagnosticSemaKinds.inc.h
+SemaTemplate.o: StmtNodes.inc.h
+SemaTemplate.po: AttrList.inc.h
+SemaTemplate.po: AttrParsedAttrList.inc.h
+SemaTemplate.po: Attrs.inc.h
+SemaTemplate.po: DeclNodes.inc.h
+SemaTemplate.po: DiagnosticCommonKinds.inc.h
+SemaTemplate.po: DiagnosticSemaKinds.inc.h
+SemaTemplate.po: StmtNodes.inc.h
+SemaTemplateDeduction.o: AttrList.inc.h
+SemaTemplateDeduction.o: AttrParsedAttrList.inc.h
+SemaTemplateDeduction.o: Attrs.inc.h
+SemaTemplateDeduction.o: DeclNodes.inc.h
+SemaTemplateDeduction.o: DiagnosticCommonKinds.inc.h
+SemaTemplateDeduction.o: DiagnosticSemaKinds.inc.h
+SemaTemplateDeduction.o: StmtNodes.inc.h
+SemaTemplateDeduction.po: AttrList.inc.h
+SemaTemplateDeduction.po: AttrParsedAttrList.inc.h
+SemaTemplateDeduction.po: Attrs.inc.h
+SemaTemplateDeduction.po: DeclNodes.inc.h
+SemaTemplateDeduction.po: DiagnosticCommonKinds.inc.h
+SemaTemplateDeduction.po: DiagnosticSemaKinds.inc.h
+SemaTemplateDeduction.po: StmtNodes.inc.h
+SemaTemplateInstantiate.o: AttrList.inc.h
+SemaTemplateInstantiate.o: AttrParsedAttrList.inc.h
+SemaTemplateInstantiate.o: Attrs.inc.h
+SemaTemplateInstantiate.o: DeclNodes.inc.h
+SemaTemplateInstantiate.o: DiagnosticCommonKinds.inc.h
+SemaTemplateInstantiate.o: DiagnosticSemaKinds.inc.h
+SemaTemplateInstantiate.o: StmtNodes.inc.h
+SemaTemplateInstantiate.po: AttrList.inc.h
+SemaTemplateInstantiate.po: AttrParsedAttrList.inc.h
+SemaTemplateInstantiate.po: Attrs.inc.h
+SemaTemplateInstantiate.po: DeclNodes.inc.h
+SemaTemplateInstantiate.po: DiagnosticCommonKinds.inc.h
+SemaTemplateInstantiate.po: DiagnosticSemaKinds.inc.h
+SemaTemplateInstantiate.po: StmtNodes.inc.h
+SemaTemplateInstantiateDecl.o: AttrList.inc.h
+SemaTemplateInstantiateDecl.o: AttrParsedAttrList.inc.h
+SemaTemplateInstantiateDecl.o: AttrTemplateInstantiate.inc.h
+SemaTemplateInstantiateDecl.o: Attrs.inc.h
+SemaTemplateInstantiateDecl.o: DeclNodes.inc.h
+SemaTemplateInstantiateDecl.o: DiagnosticCommonKinds.inc.h
+SemaTemplateInstantiateDecl.o: DiagnosticSemaKinds.inc.h
+SemaTemplateInstantiateDecl.o: StmtNodes.inc.h
+SemaTemplateInstantiateDecl.po: AttrList.inc.h
+SemaTemplateInstantiateDecl.po: AttrParsedAttrList.inc.h
+SemaTemplateInstantiateDecl.po: AttrTemplateInstantiate.inc.h
+SemaTemplateInstantiateDecl.po: Attrs.inc.h
+SemaTemplateInstantiateDecl.po: DeclNodes.inc.h
+SemaTemplateInstantiateDecl.po: DiagnosticCommonKinds.inc.h
+SemaTemplateInstantiateDecl.po: DiagnosticSemaKinds.inc.h
+SemaTemplateInstantiateDecl.po: StmtNodes.inc.h
+SemaTemplateVariadic.o: AttrList.inc.h
+SemaTemplateVariadic.o: AttrParsedAttrList.inc.h
+SemaTemplateVariadic.o: Attrs.inc.h
+SemaTemplateVariadic.o: DeclNodes.inc.h
+SemaTemplateVariadic.o: DiagnosticCommonKinds.inc.h
+SemaTemplateVariadic.o: DiagnosticSemaKinds.inc.h
+SemaTemplateVariadic.o: StmtNodes.inc.h
+SemaTemplateVariadic.po: AttrList.inc.h
+SemaTemplateVariadic.po: AttrParsedAttrList.inc.h
+SemaTemplateVariadic.po: Attrs.inc.h
+SemaTemplateVariadic.po: DeclNodes.inc.h
+SemaTemplateVariadic.po: DiagnosticCommonKinds.inc.h
+SemaTemplateVariadic.po: DiagnosticSemaKinds.inc.h
+SemaTemplateVariadic.po: StmtNodes.inc.h
+SemaType.o: AttrList.inc.h
+SemaType.o: AttrParsedAttrList.inc.h
+SemaType.o: Attrs.inc.h
+SemaType.o: DeclNodes.inc.h
+SemaType.o: DiagnosticCommonKinds.inc.h
+SemaType.o: DiagnosticParseKinds.inc.h
+SemaType.o: DiagnosticSemaKinds.inc.h
+SemaType.o: StmtNodes.inc.h
+SemaType.po: AttrList.inc.h
+SemaType.po: AttrParsedAttrList.inc.h
+SemaType.po: Attrs.inc.h
+SemaType.po: DeclNodes.inc.h
+SemaType.po: DiagnosticCommonKinds.inc.h
+SemaType.po: DiagnosticParseKinds.inc.h
+SemaType.po: DiagnosticSemaKinds.inc.h
+SemaType.po: StmtNodes.inc.h
+TargetAttributesSema.o: AttrList.inc.h
+TargetAttributesSema.o: AttrParsedAttrList.inc.h
+TargetAttributesSema.o: Attrs.inc.h
+TargetAttributesSema.o: DeclNodes.inc.h
+TargetAttributesSema.o: DiagnosticCommonKinds.inc.h
+TargetAttributesSema.o: DiagnosticSemaKinds.inc.h
+TargetAttributesSema.o: StmtNodes.inc.h
+TargetAttributesSema.po: AttrList.inc.h
+TargetAttributesSema.po: AttrParsedAttrList.inc.h
+TargetAttributesSema.po: Attrs.inc.h
+TargetAttributesSema.po: DeclNodes.inc.h
+TargetAttributesSema.po: DiagnosticCommonKinds.inc.h
+TargetAttributesSema.po: DiagnosticSemaKinds.inc.h
+TargetAttributesSema.po: StmtNodes.inc.h
+.endif
diff --git a/lib/clang/libclangserialization/Makefile b/lib/clang/libclangserialization/Makefile
index acd97ae..75f68bf 100644
--- a/lib/clang/libclangserialization/Makefile
+++ b/lib/clang/libclangserialization/Makefile
@@ -19,6 +19,7 @@ TGHDRS= AttrList \
AttrPCHWrite \
AttrParsedAttrList \
Attrs \
+ CommentNodes \
DeclNodes \
DiagnosticCommonKinds \
DiagnosticFrontendKinds \
diff --git a/lib/clang/libclangserialization/Makefile.depend b/lib/clang/libclangserialization/Makefile.depend
new file mode 100644
index 0000000..96ace89
--- /dev/null
+++ b/lib/clang/libclangserialization/Makefile.depend
@@ -0,0 +1,111 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+ASTCommon.o: AttrList.inc.h
+ASTCommon.o: Attrs.inc.h
+ASTCommon.o: DeclNodes.inc.h
+ASTCommon.o: DiagnosticCommonKinds.inc.h
+ASTCommon.po: AttrList.inc.h
+ASTCommon.po: Attrs.inc.h
+ASTCommon.po: DeclNodes.inc.h
+ASTCommon.po: DiagnosticCommonKinds.inc.h
+ASTReader.o: AttrList.inc.h
+ASTReader.o: AttrParsedAttrList.inc.h
+ASTReader.o: Attrs.inc.h
+ASTReader.o: DeclNodes.inc.h
+ASTReader.o: DiagnosticCommonKinds.inc.h
+ASTReader.o: DiagnosticSerializationKinds.inc.h
+ASTReader.o: StmtNodes.inc.h
+ASTReader.po: AttrList.inc.h
+ASTReader.po: AttrParsedAttrList.inc.h
+ASTReader.po: Attrs.inc.h
+ASTReader.po: DeclNodes.inc.h
+ASTReader.po: DiagnosticCommonKinds.inc.h
+ASTReader.po: DiagnosticSerializationKinds.inc.h
+ASTReader.po: StmtNodes.inc.h
+ASTReaderDecl.o: AttrList.inc.h
+ASTReaderDecl.o: AttrPCHRead.inc.h
+ASTReaderDecl.o: AttrParsedAttrList.inc.h
+ASTReaderDecl.o: Attrs.inc.h
+ASTReaderDecl.o: DeclNodes.inc.h
+ASTReaderDecl.o: DiagnosticCommonKinds.inc.h
+ASTReaderDecl.o: DiagnosticSemaKinds.inc.h
+ASTReaderDecl.o: StmtNodes.inc.h
+ASTReaderDecl.po: AttrList.inc.h
+ASTReaderDecl.po: AttrPCHRead.inc.h
+ASTReaderDecl.po: AttrParsedAttrList.inc.h
+ASTReaderDecl.po: Attrs.inc.h
+ASTReaderDecl.po: DeclNodes.inc.h
+ASTReaderDecl.po: DiagnosticCommonKinds.inc.h
+ASTReaderDecl.po: DiagnosticSemaKinds.inc.h
+ASTReaderDecl.po: StmtNodes.inc.h
+ASTReaderStmt.o: AttrList.inc.h
+ASTReaderStmt.o: Attrs.inc.h
+ASTReaderStmt.o: DeclNodes.inc.h
+ASTReaderStmt.o: DiagnosticCommonKinds.inc.h
+ASTReaderStmt.o: StmtNodes.inc.h
+ASTReaderStmt.po: AttrList.inc.h
+ASTReaderStmt.po: Attrs.inc.h
+ASTReaderStmt.po: DeclNodes.inc.h
+ASTReaderStmt.po: DiagnosticCommonKinds.inc.h
+ASTReaderStmt.po: StmtNodes.inc.h
+ASTWriter.o: AttrList.inc.h
+ASTWriter.o: AttrPCHWrite.inc.h
+ASTWriter.o: AttrParsedAttrList.inc.h
+ASTWriter.o: Attrs.inc.h
+ASTWriter.o: DeclNodes.inc.h
+ASTWriter.o: DiagnosticCommonKinds.inc.h
+ASTWriter.o: StmtNodes.inc.h
+ASTWriter.po: AttrList.inc.h
+ASTWriter.po: AttrPCHWrite.inc.h
+ASTWriter.po: AttrParsedAttrList.inc.h
+ASTWriter.po: Attrs.inc.h
+ASTWriter.po: DeclNodes.inc.h
+ASTWriter.po: DiagnosticCommonKinds.inc.h
+ASTWriter.po: StmtNodes.inc.h
+ASTWriterDecl.o: AttrList.inc.h
+ASTWriterDecl.o: Attrs.inc.h
+ASTWriterDecl.o: DeclNodes.inc.h
+ASTWriterDecl.o: DiagnosticCommonKinds.inc.h
+ASTWriterDecl.o: StmtNodes.inc.h
+ASTWriterDecl.po: AttrList.inc.h
+ASTWriterDecl.po: Attrs.inc.h
+ASTWriterDecl.po: DeclNodes.inc.h
+ASTWriterDecl.po: DiagnosticCommonKinds.inc.h
+ASTWriterDecl.po: StmtNodes.inc.h
+ASTWriterStmt.o: AttrList.inc.h
+ASTWriterStmt.o: Attrs.inc.h
+ASTWriterStmt.o: DeclNodes.inc.h
+ASTWriterStmt.o: DiagnosticCommonKinds.inc.h
+ASTWriterStmt.o: StmtNodes.inc.h
+ASTWriterStmt.po: AttrList.inc.h
+ASTWriterStmt.po: Attrs.inc.h
+ASTWriterStmt.po: DeclNodes.inc.h
+ASTWriterStmt.po: DiagnosticCommonKinds.inc.h
+ASTWriterStmt.po: StmtNodes.inc.h
+GeneratePCH.o: AttrList.inc.h
+GeneratePCH.o: Attrs.inc.h
+GeneratePCH.o: DeclNodes.inc.h
+GeneratePCH.o: DiagnosticCommonKinds.inc.h
+GeneratePCH.po: AttrList.inc.h
+GeneratePCH.po: Attrs.inc.h
+GeneratePCH.po: DeclNodes.inc.h
+GeneratePCH.po: DiagnosticCommonKinds.inc.h
+Module.o: DiagnosticCommonKinds.inc.h
+Module.po: DiagnosticCommonKinds.inc.h
+ModuleManager.o: DiagnosticCommonKinds.inc.h
+ModuleManager.po: DiagnosticCommonKinds.inc.h
+.endif
diff --git a/lib/clang/libclangstaticanalyzercheckers/Makefile b/lib/clang/libclangstaticanalyzercheckers/Makefile
index d4eb771..1ad97b2 100644
--- a/lib/clang/libclangstaticanalyzercheckers/Makefile
+++ b/lib/clang/libclangstaticanalyzercheckers/Makefile
@@ -28,10 +28,11 @@ SRCS= AdjustedReturnValueChecker.cpp \
DebugCheckers.cpp \
DereferenceChecker.cpp \
DivZeroChecker.cpp \
+ DynamicTypePropagation.cpp \
+ ExprInspectionChecker.cpp \
FixedAddressChecker.cpp \
GenericTaintChecker.cpp \
IdempotentOperationChecker.cpp \
- IteratorsChecker.cpp \
LLVMConventionsChecker.cpp \
MacOSKeychainAPIChecker.cpp \
MacOSXAPIChecker.cpp \
@@ -56,6 +57,7 @@ SRCS= AdjustedReturnValueChecker.cpp \
StackAddrEscapeChecker.cpp \
StreamChecker.cpp \
TaintTesterChecker.cpp \
+ TraversalChecker.cpp \
UndefBranchChecker.cpp \
UndefCapturedBlockVarChecker.cpp \
UndefResultChecker.cpp \
@@ -69,6 +71,7 @@ SRCS= AdjustedReturnValueChecker.cpp \
TGHDRS= AttrList \
Attrs \
Checkers \
+ CommentNodes \
DeclNodes \
DiagnosticCommonKinds \
StmtNodes
diff --git a/lib/clang/libclangstaticanalyzercheckers/Makefile.depend b/lib/clang/libclangstaticanalyzercheckers/Makefile.depend
new file mode 100644
index 0000000..d287f2b
--- /dev/null
+++ b/lib/clang/libclangstaticanalyzercheckers/Makefile.depend
@@ -0,0 +1,749 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+AdjustedReturnValueChecker.o: AttrList.inc.h
+AdjustedReturnValueChecker.o: Attrs.inc.h
+AdjustedReturnValueChecker.o: Checkers.inc.h
+AdjustedReturnValueChecker.o: DeclNodes.inc.h
+AdjustedReturnValueChecker.o: DiagnosticCommonKinds.inc.h
+AdjustedReturnValueChecker.o: StmtNodes.inc.h
+AdjustedReturnValueChecker.po: AttrList.inc.h
+AdjustedReturnValueChecker.po: Attrs.inc.h
+AdjustedReturnValueChecker.po: Checkers.inc.h
+AdjustedReturnValueChecker.po: DeclNodes.inc.h
+AdjustedReturnValueChecker.po: DiagnosticCommonKinds.inc.h
+AdjustedReturnValueChecker.po: StmtNodes.inc.h
+AnalyzerStatsChecker.o: AttrList.inc.h
+AnalyzerStatsChecker.o: Attrs.inc.h
+AnalyzerStatsChecker.o: Checkers.inc.h
+AnalyzerStatsChecker.o: DeclNodes.inc.h
+AnalyzerStatsChecker.o: DiagnosticCommonKinds.inc.h
+AnalyzerStatsChecker.o: StmtNodes.inc.h
+AnalyzerStatsChecker.po: AttrList.inc.h
+AnalyzerStatsChecker.po: Attrs.inc.h
+AnalyzerStatsChecker.po: Checkers.inc.h
+AnalyzerStatsChecker.po: DeclNodes.inc.h
+AnalyzerStatsChecker.po: DiagnosticCommonKinds.inc.h
+AnalyzerStatsChecker.po: StmtNodes.inc.h
+ArrayBoundChecker.o: AttrList.inc.h
+ArrayBoundChecker.o: Attrs.inc.h
+ArrayBoundChecker.o: Checkers.inc.h
+ArrayBoundChecker.o: DeclNodes.inc.h
+ArrayBoundChecker.o: DiagnosticCommonKinds.inc.h
+ArrayBoundChecker.o: StmtNodes.inc.h
+ArrayBoundChecker.po: AttrList.inc.h
+ArrayBoundChecker.po: Attrs.inc.h
+ArrayBoundChecker.po: Checkers.inc.h
+ArrayBoundChecker.po: DeclNodes.inc.h
+ArrayBoundChecker.po: DiagnosticCommonKinds.inc.h
+ArrayBoundChecker.po: StmtNodes.inc.h
+ArrayBoundCheckerV2.o: AttrList.inc.h
+ArrayBoundCheckerV2.o: Attrs.inc.h
+ArrayBoundCheckerV2.o: Checkers.inc.h
+ArrayBoundCheckerV2.o: DeclNodes.inc.h
+ArrayBoundCheckerV2.o: DiagnosticCommonKinds.inc.h
+ArrayBoundCheckerV2.o: StmtNodes.inc.h
+ArrayBoundCheckerV2.po: AttrList.inc.h
+ArrayBoundCheckerV2.po: Attrs.inc.h
+ArrayBoundCheckerV2.po: Checkers.inc.h
+ArrayBoundCheckerV2.po: DeclNodes.inc.h
+ArrayBoundCheckerV2.po: DiagnosticCommonKinds.inc.h
+ArrayBoundCheckerV2.po: StmtNodes.inc.h
+AttrNonNullChecker.o: AttrList.inc.h
+AttrNonNullChecker.o: Attrs.inc.h
+AttrNonNullChecker.o: Checkers.inc.h
+AttrNonNullChecker.o: DeclNodes.inc.h
+AttrNonNullChecker.o: DiagnosticCommonKinds.inc.h
+AttrNonNullChecker.o: StmtNodes.inc.h
+AttrNonNullChecker.po: AttrList.inc.h
+AttrNonNullChecker.po: Attrs.inc.h
+AttrNonNullChecker.po: Checkers.inc.h
+AttrNonNullChecker.po: DeclNodes.inc.h
+AttrNonNullChecker.po: DiagnosticCommonKinds.inc.h
+AttrNonNullChecker.po: StmtNodes.inc.h
+BasicObjCFoundationChecks.o: AttrList.inc.h
+BasicObjCFoundationChecks.o: Attrs.inc.h
+BasicObjCFoundationChecks.o: Checkers.inc.h
+BasicObjCFoundationChecks.o: DeclNodes.inc.h
+BasicObjCFoundationChecks.o: DiagnosticCommonKinds.inc.h
+BasicObjCFoundationChecks.o: StmtNodes.inc.h
+BasicObjCFoundationChecks.po: AttrList.inc.h
+BasicObjCFoundationChecks.po: Attrs.inc.h
+BasicObjCFoundationChecks.po: Checkers.inc.h
+BasicObjCFoundationChecks.po: DeclNodes.inc.h
+BasicObjCFoundationChecks.po: DiagnosticCommonKinds.inc.h
+BasicObjCFoundationChecks.po: StmtNodes.inc.h
+BoolAssignmentChecker.o: AttrList.inc.h
+BoolAssignmentChecker.o: Attrs.inc.h
+BoolAssignmentChecker.o: Checkers.inc.h
+BoolAssignmentChecker.o: DeclNodes.inc.h
+BoolAssignmentChecker.o: DiagnosticCommonKinds.inc.h
+BoolAssignmentChecker.o: StmtNodes.inc.h
+BoolAssignmentChecker.po: AttrList.inc.h
+BoolAssignmentChecker.po: Attrs.inc.h
+BoolAssignmentChecker.po: Checkers.inc.h
+BoolAssignmentChecker.po: DeclNodes.inc.h
+BoolAssignmentChecker.po: DiagnosticCommonKinds.inc.h
+BoolAssignmentChecker.po: StmtNodes.inc.h
+BuiltinFunctionChecker.o: AttrList.inc.h
+BuiltinFunctionChecker.o: Attrs.inc.h
+BuiltinFunctionChecker.o: Checkers.inc.h
+BuiltinFunctionChecker.o: DeclNodes.inc.h
+BuiltinFunctionChecker.o: DiagnosticCommonKinds.inc.h
+BuiltinFunctionChecker.o: StmtNodes.inc.h
+BuiltinFunctionChecker.po: AttrList.inc.h
+BuiltinFunctionChecker.po: Attrs.inc.h
+BuiltinFunctionChecker.po: Checkers.inc.h
+BuiltinFunctionChecker.po: DeclNodes.inc.h
+BuiltinFunctionChecker.po: DiagnosticCommonKinds.inc.h
+BuiltinFunctionChecker.po: StmtNodes.inc.h
+CStringChecker.o: AttrList.inc.h
+CStringChecker.o: Attrs.inc.h
+CStringChecker.o: Checkers.inc.h
+CStringChecker.o: DeclNodes.inc.h
+CStringChecker.o: DiagnosticCommonKinds.inc.h
+CStringChecker.o: StmtNodes.inc.h
+CStringChecker.po: AttrList.inc.h
+CStringChecker.po: Attrs.inc.h
+CStringChecker.po: Checkers.inc.h
+CStringChecker.po: DeclNodes.inc.h
+CStringChecker.po: DiagnosticCommonKinds.inc.h
+CStringChecker.po: StmtNodes.inc.h
+CStringSyntaxChecker.o: AttrList.inc.h
+CStringSyntaxChecker.o: Attrs.inc.h
+CStringSyntaxChecker.o: Checkers.inc.h
+CStringSyntaxChecker.o: DeclNodes.inc.h
+CStringSyntaxChecker.o: DiagnosticCommonKinds.inc.h
+CStringSyntaxChecker.o: StmtNodes.inc.h
+CStringSyntaxChecker.po: AttrList.inc.h
+CStringSyntaxChecker.po: Attrs.inc.h
+CStringSyntaxChecker.po: Checkers.inc.h
+CStringSyntaxChecker.po: DeclNodes.inc.h
+CStringSyntaxChecker.po: DiagnosticCommonKinds.inc.h
+CStringSyntaxChecker.po: StmtNodes.inc.h
+CallAndMessageChecker.o: AttrList.inc.h
+CallAndMessageChecker.o: Attrs.inc.h
+CallAndMessageChecker.o: Checkers.inc.h
+CallAndMessageChecker.o: DeclNodes.inc.h
+CallAndMessageChecker.o: DiagnosticCommonKinds.inc.h
+CallAndMessageChecker.o: StmtNodes.inc.h
+CallAndMessageChecker.po: AttrList.inc.h
+CallAndMessageChecker.po: Attrs.inc.h
+CallAndMessageChecker.po: Checkers.inc.h
+CallAndMessageChecker.po: DeclNodes.inc.h
+CallAndMessageChecker.po: DiagnosticCommonKinds.inc.h
+CallAndMessageChecker.po: StmtNodes.inc.h
+CastSizeChecker.o: AttrList.inc.h
+CastSizeChecker.o: Attrs.inc.h
+CastSizeChecker.o: Checkers.inc.h
+CastSizeChecker.o: DeclNodes.inc.h
+CastSizeChecker.o: DiagnosticCommonKinds.inc.h
+CastSizeChecker.o: StmtNodes.inc.h
+CastSizeChecker.po: AttrList.inc.h
+CastSizeChecker.po: Attrs.inc.h
+CastSizeChecker.po: Checkers.inc.h
+CastSizeChecker.po: DeclNodes.inc.h
+CastSizeChecker.po: DiagnosticCommonKinds.inc.h
+CastSizeChecker.po: StmtNodes.inc.h
+CastToStructChecker.o: AttrList.inc.h
+CastToStructChecker.o: Attrs.inc.h
+CastToStructChecker.o: Checkers.inc.h
+CastToStructChecker.o: DeclNodes.inc.h
+CastToStructChecker.o: DiagnosticCommonKinds.inc.h
+CastToStructChecker.o: StmtNodes.inc.h
+CastToStructChecker.po: AttrList.inc.h
+CastToStructChecker.po: Attrs.inc.h
+CastToStructChecker.po: Checkers.inc.h
+CastToStructChecker.po: DeclNodes.inc.h
+CastToStructChecker.po: DiagnosticCommonKinds.inc.h
+CastToStructChecker.po: StmtNodes.inc.h
+CheckObjCDealloc.o: AttrList.inc.h
+CheckObjCDealloc.o: Attrs.inc.h
+CheckObjCDealloc.o: Checkers.inc.h
+CheckObjCDealloc.o: DeclNodes.inc.h
+CheckObjCDealloc.o: DiagnosticCommonKinds.inc.h
+CheckObjCDealloc.o: StmtNodes.inc.h
+CheckObjCDealloc.po: AttrList.inc.h
+CheckObjCDealloc.po: Attrs.inc.h
+CheckObjCDealloc.po: Checkers.inc.h
+CheckObjCDealloc.po: DeclNodes.inc.h
+CheckObjCDealloc.po: DiagnosticCommonKinds.inc.h
+CheckObjCDealloc.po: StmtNodes.inc.h
+CheckObjCInstMethSignature.o: AttrList.inc.h
+CheckObjCInstMethSignature.o: Attrs.inc.h
+CheckObjCInstMethSignature.o: Checkers.inc.h
+CheckObjCInstMethSignature.o: DeclNodes.inc.h
+CheckObjCInstMethSignature.o: DiagnosticCommonKinds.inc.h
+CheckObjCInstMethSignature.o: StmtNodes.inc.h
+CheckObjCInstMethSignature.po: AttrList.inc.h
+CheckObjCInstMethSignature.po: Attrs.inc.h
+CheckObjCInstMethSignature.po: Checkers.inc.h
+CheckObjCInstMethSignature.po: DeclNodes.inc.h
+CheckObjCInstMethSignature.po: DiagnosticCommonKinds.inc.h
+CheckObjCInstMethSignature.po: StmtNodes.inc.h
+CheckSecuritySyntaxOnly.o: AttrList.inc.h
+CheckSecuritySyntaxOnly.o: Attrs.inc.h
+CheckSecuritySyntaxOnly.o: Checkers.inc.h
+CheckSecuritySyntaxOnly.o: DeclNodes.inc.h
+CheckSecuritySyntaxOnly.o: DiagnosticCommonKinds.inc.h
+CheckSecuritySyntaxOnly.o: StmtNodes.inc.h
+CheckSecuritySyntaxOnly.po: AttrList.inc.h
+CheckSecuritySyntaxOnly.po: Attrs.inc.h
+CheckSecuritySyntaxOnly.po: Checkers.inc.h
+CheckSecuritySyntaxOnly.po: DeclNodes.inc.h
+CheckSecuritySyntaxOnly.po: DiagnosticCommonKinds.inc.h
+CheckSecuritySyntaxOnly.po: StmtNodes.inc.h
+CheckSizeofPointer.o: AttrList.inc.h
+CheckSizeofPointer.o: Attrs.inc.h
+CheckSizeofPointer.o: Checkers.inc.h
+CheckSizeofPointer.o: DeclNodes.inc.h
+CheckSizeofPointer.o: DiagnosticCommonKinds.inc.h
+CheckSizeofPointer.o: StmtNodes.inc.h
+CheckSizeofPointer.po: AttrList.inc.h
+CheckSizeofPointer.po: Attrs.inc.h
+CheckSizeofPointer.po: Checkers.inc.h
+CheckSizeofPointer.po: DeclNodes.inc.h
+CheckSizeofPointer.po: DiagnosticCommonKinds.inc.h
+CheckSizeofPointer.po: StmtNodes.inc.h
+CheckerDocumentation.o: AttrList.inc.h
+CheckerDocumentation.o: Attrs.inc.h
+CheckerDocumentation.o: Checkers.inc.h
+CheckerDocumentation.o: DeclNodes.inc.h
+CheckerDocumentation.o: DiagnosticCommonKinds.inc.h
+CheckerDocumentation.o: StmtNodes.inc.h
+CheckerDocumentation.po: AttrList.inc.h
+CheckerDocumentation.po: Attrs.inc.h
+CheckerDocumentation.po: Checkers.inc.h
+CheckerDocumentation.po: DeclNodes.inc.h
+CheckerDocumentation.po: DiagnosticCommonKinds.inc.h
+CheckerDocumentation.po: StmtNodes.inc.h
+ChrootChecker.o: AttrList.inc.h
+ChrootChecker.o: Attrs.inc.h
+ChrootChecker.o: Checkers.inc.h
+ChrootChecker.o: DeclNodes.inc.h
+ChrootChecker.o: DiagnosticCommonKinds.inc.h
+ChrootChecker.o: StmtNodes.inc.h
+ChrootChecker.po: AttrList.inc.h
+ChrootChecker.po: Attrs.inc.h
+ChrootChecker.po: Checkers.inc.h
+ChrootChecker.po: DeclNodes.inc.h
+ChrootChecker.po: DiagnosticCommonKinds.inc.h
+ChrootChecker.po: StmtNodes.inc.h
+ClangCheckers.o: AttrList.inc.h
+ClangCheckers.o: Attrs.inc.h
+ClangCheckers.o: Checkers.inc.h
+ClangCheckers.o: DeclNodes.inc.h
+ClangCheckers.o: DiagnosticCommonKinds.inc.h
+ClangCheckers.o: StmtNodes.inc.h
+ClangCheckers.po: AttrList.inc.h
+ClangCheckers.po: Attrs.inc.h
+ClangCheckers.po: Checkers.inc.h
+ClangCheckers.po: DeclNodes.inc.h
+ClangCheckers.po: DiagnosticCommonKinds.inc.h
+ClangCheckers.po: StmtNodes.inc.h
+DeadStoresChecker.o: AttrList.inc.h
+DeadStoresChecker.o: Attrs.inc.h
+DeadStoresChecker.o: Checkers.inc.h
+DeadStoresChecker.o: DeclNodes.inc.h
+DeadStoresChecker.o: DiagnosticCommonKinds.inc.h
+DeadStoresChecker.o: StmtNodes.inc.h
+DeadStoresChecker.po: AttrList.inc.h
+DeadStoresChecker.po: Attrs.inc.h
+DeadStoresChecker.po: Checkers.inc.h
+DeadStoresChecker.po: DeclNodes.inc.h
+DeadStoresChecker.po: DiagnosticCommonKinds.inc.h
+DeadStoresChecker.po: StmtNodes.inc.h
+DebugCheckers.o: AttrList.inc.h
+DebugCheckers.o: Attrs.inc.h
+DebugCheckers.o: Checkers.inc.h
+DebugCheckers.o: DeclNodes.inc.h
+DebugCheckers.o: DiagnosticCommonKinds.inc.h
+DebugCheckers.o: StmtNodes.inc.h
+DebugCheckers.po: AttrList.inc.h
+DebugCheckers.po: Attrs.inc.h
+DebugCheckers.po: Checkers.inc.h
+DebugCheckers.po: DeclNodes.inc.h
+DebugCheckers.po: DiagnosticCommonKinds.inc.h
+DebugCheckers.po: StmtNodes.inc.h
+DereferenceChecker.o: AttrList.inc.h
+DereferenceChecker.o: Attrs.inc.h
+DereferenceChecker.o: Checkers.inc.h
+DereferenceChecker.o: DeclNodes.inc.h
+DereferenceChecker.o: DiagnosticCommonKinds.inc.h
+DereferenceChecker.o: StmtNodes.inc.h
+DereferenceChecker.po: AttrList.inc.h
+DereferenceChecker.po: Attrs.inc.h
+DereferenceChecker.po: Checkers.inc.h
+DereferenceChecker.po: DeclNodes.inc.h
+DereferenceChecker.po: DiagnosticCommonKinds.inc.h
+DereferenceChecker.po: StmtNodes.inc.h
+DivZeroChecker.o: AttrList.inc.h
+DivZeroChecker.o: Attrs.inc.h
+DivZeroChecker.o: Checkers.inc.h
+DivZeroChecker.o: DeclNodes.inc.h
+DivZeroChecker.o: DiagnosticCommonKinds.inc.h
+DivZeroChecker.o: StmtNodes.inc.h
+DivZeroChecker.po: AttrList.inc.h
+DivZeroChecker.po: Attrs.inc.h
+DivZeroChecker.po: Checkers.inc.h
+DivZeroChecker.po: DeclNodes.inc.h
+DivZeroChecker.po: DiagnosticCommonKinds.inc.h
+DivZeroChecker.po: StmtNodes.inc.h
+FixedAddressChecker.o: AttrList.inc.h
+FixedAddressChecker.o: Attrs.inc.h
+FixedAddressChecker.o: Checkers.inc.h
+FixedAddressChecker.o: DeclNodes.inc.h
+FixedAddressChecker.o: DiagnosticCommonKinds.inc.h
+FixedAddressChecker.o: StmtNodes.inc.h
+FixedAddressChecker.po: AttrList.inc.h
+FixedAddressChecker.po: Attrs.inc.h
+FixedAddressChecker.po: Checkers.inc.h
+FixedAddressChecker.po: DeclNodes.inc.h
+FixedAddressChecker.po: DiagnosticCommonKinds.inc.h
+FixedAddressChecker.po: StmtNodes.inc.h
+GenericTaintChecker.o: AttrList.inc.h
+GenericTaintChecker.o: Attrs.inc.h
+GenericTaintChecker.o: Checkers.inc.h
+GenericTaintChecker.o: DeclNodes.inc.h
+GenericTaintChecker.o: DiagnosticCommonKinds.inc.h
+GenericTaintChecker.o: StmtNodes.inc.h
+GenericTaintChecker.po: AttrList.inc.h
+GenericTaintChecker.po: Attrs.inc.h
+GenericTaintChecker.po: Checkers.inc.h
+GenericTaintChecker.po: DeclNodes.inc.h
+GenericTaintChecker.po: DiagnosticCommonKinds.inc.h
+GenericTaintChecker.po: StmtNodes.inc.h
+IdempotentOperationChecker.o: AttrList.inc.h
+IdempotentOperationChecker.o: Attrs.inc.h
+IdempotentOperationChecker.o: Checkers.inc.h
+IdempotentOperationChecker.o: DeclNodes.inc.h
+IdempotentOperationChecker.o: DiagnosticCommonKinds.inc.h
+IdempotentOperationChecker.o: StmtNodes.inc.h
+IdempotentOperationChecker.po: AttrList.inc.h
+IdempotentOperationChecker.po: Attrs.inc.h
+IdempotentOperationChecker.po: Checkers.inc.h
+IdempotentOperationChecker.po: DeclNodes.inc.h
+IdempotentOperationChecker.po: DiagnosticCommonKinds.inc.h
+IdempotentOperationChecker.po: StmtNodes.inc.h
+IteratorsChecker.o: AttrList.inc.h
+IteratorsChecker.o: Attrs.inc.h
+IteratorsChecker.o: Checkers.inc.h
+IteratorsChecker.o: DeclNodes.inc.h
+IteratorsChecker.o: DiagnosticCommonKinds.inc.h
+IteratorsChecker.o: StmtNodes.inc.h
+IteratorsChecker.po: AttrList.inc.h
+IteratorsChecker.po: Attrs.inc.h
+IteratorsChecker.po: Checkers.inc.h
+IteratorsChecker.po: DeclNodes.inc.h
+IteratorsChecker.po: DiagnosticCommonKinds.inc.h
+IteratorsChecker.po: StmtNodes.inc.h
+LLVMConventionsChecker.o: AttrList.inc.h
+LLVMConventionsChecker.o: Attrs.inc.h
+LLVMConventionsChecker.o: Checkers.inc.h
+LLVMConventionsChecker.o: DeclNodes.inc.h
+LLVMConventionsChecker.o: DiagnosticCommonKinds.inc.h
+LLVMConventionsChecker.o: StmtNodes.inc.h
+LLVMConventionsChecker.po: AttrList.inc.h
+LLVMConventionsChecker.po: Attrs.inc.h
+LLVMConventionsChecker.po: Checkers.inc.h
+LLVMConventionsChecker.po: DeclNodes.inc.h
+LLVMConventionsChecker.po: DiagnosticCommonKinds.inc.h
+LLVMConventionsChecker.po: StmtNodes.inc.h
+MacOSKeychainAPIChecker.o: AttrList.inc.h
+MacOSKeychainAPIChecker.o: Attrs.inc.h
+MacOSKeychainAPIChecker.o: Checkers.inc.h
+MacOSKeychainAPIChecker.o: DeclNodes.inc.h
+MacOSKeychainAPIChecker.o: DiagnosticCommonKinds.inc.h
+MacOSKeychainAPIChecker.o: StmtNodes.inc.h
+MacOSKeychainAPIChecker.po: AttrList.inc.h
+MacOSKeychainAPIChecker.po: Attrs.inc.h
+MacOSKeychainAPIChecker.po: Checkers.inc.h
+MacOSKeychainAPIChecker.po: DeclNodes.inc.h
+MacOSKeychainAPIChecker.po: DiagnosticCommonKinds.inc.h
+MacOSKeychainAPIChecker.po: StmtNodes.inc.h
+MacOSXAPIChecker.o: AttrList.inc.h
+MacOSXAPIChecker.o: Attrs.inc.h
+MacOSXAPIChecker.o: Checkers.inc.h
+MacOSXAPIChecker.o: DeclNodes.inc.h
+MacOSXAPIChecker.o: DiagnosticCommonKinds.inc.h
+MacOSXAPIChecker.o: StmtNodes.inc.h
+MacOSXAPIChecker.po: AttrList.inc.h
+MacOSXAPIChecker.po: Attrs.inc.h
+MacOSXAPIChecker.po: Checkers.inc.h
+MacOSXAPIChecker.po: DeclNodes.inc.h
+MacOSXAPIChecker.po: DiagnosticCommonKinds.inc.h
+MacOSXAPIChecker.po: StmtNodes.inc.h
+MallocChecker.o: AttrList.inc.h
+MallocChecker.o: Attrs.inc.h
+MallocChecker.o: Checkers.inc.h
+MallocChecker.o: DeclNodes.inc.h
+MallocChecker.o: DiagnosticCommonKinds.inc.h
+MallocChecker.o: StmtNodes.inc.h
+MallocChecker.po: AttrList.inc.h
+MallocChecker.po: Attrs.inc.h
+MallocChecker.po: Checkers.inc.h
+MallocChecker.po: DeclNodes.inc.h
+MallocChecker.po: DiagnosticCommonKinds.inc.h
+MallocChecker.po: StmtNodes.inc.h
+MallocOverflowSecurityChecker.o: AttrList.inc.h
+MallocOverflowSecurityChecker.o: Attrs.inc.h
+MallocOverflowSecurityChecker.o: Checkers.inc.h
+MallocOverflowSecurityChecker.o: DeclNodes.inc.h
+MallocOverflowSecurityChecker.o: DiagnosticCommonKinds.inc.h
+MallocOverflowSecurityChecker.o: StmtNodes.inc.h
+MallocOverflowSecurityChecker.po: AttrList.inc.h
+MallocOverflowSecurityChecker.po: Attrs.inc.h
+MallocOverflowSecurityChecker.po: Checkers.inc.h
+MallocOverflowSecurityChecker.po: DeclNodes.inc.h
+MallocOverflowSecurityChecker.po: DiagnosticCommonKinds.inc.h
+MallocOverflowSecurityChecker.po: StmtNodes.inc.h
+MallocSizeofChecker.o: AttrList.inc.h
+MallocSizeofChecker.o: Attrs.inc.h
+MallocSizeofChecker.o: Checkers.inc.h
+MallocSizeofChecker.o: DeclNodes.inc.h
+MallocSizeofChecker.o: DiagnosticCommonKinds.inc.h
+MallocSizeofChecker.o: StmtNodes.inc.h
+MallocSizeofChecker.po: AttrList.inc.h
+MallocSizeofChecker.po: Attrs.inc.h
+MallocSizeofChecker.po: Checkers.inc.h
+MallocSizeofChecker.po: DeclNodes.inc.h
+MallocSizeofChecker.po: DiagnosticCommonKinds.inc.h
+MallocSizeofChecker.po: StmtNodes.inc.h
+NSAutoreleasePoolChecker.o: AttrList.inc.h
+NSAutoreleasePoolChecker.o: Attrs.inc.h
+NSAutoreleasePoolChecker.o: Checkers.inc.h
+NSAutoreleasePoolChecker.o: DeclNodes.inc.h
+NSAutoreleasePoolChecker.o: DiagnosticCommonKinds.inc.h
+NSAutoreleasePoolChecker.o: StmtNodes.inc.h
+NSAutoreleasePoolChecker.po: AttrList.inc.h
+NSAutoreleasePoolChecker.po: Attrs.inc.h
+NSAutoreleasePoolChecker.po: Checkers.inc.h
+NSAutoreleasePoolChecker.po: DeclNodes.inc.h
+NSAutoreleasePoolChecker.po: DiagnosticCommonKinds.inc.h
+NSAutoreleasePoolChecker.po: StmtNodes.inc.h
+NSErrorChecker.o: AttrList.inc.h
+NSErrorChecker.o: Attrs.inc.h
+NSErrorChecker.o: Checkers.inc.h
+NSErrorChecker.o: DeclNodes.inc.h
+NSErrorChecker.o: DiagnosticCommonKinds.inc.h
+NSErrorChecker.o: StmtNodes.inc.h
+NSErrorChecker.po: AttrList.inc.h
+NSErrorChecker.po: Attrs.inc.h
+NSErrorChecker.po: Checkers.inc.h
+NSErrorChecker.po: DeclNodes.inc.h
+NSErrorChecker.po: DiagnosticCommonKinds.inc.h
+NSErrorChecker.po: StmtNodes.inc.h
+NoReturnFunctionChecker.o: AttrList.inc.h
+NoReturnFunctionChecker.o: Attrs.inc.h
+NoReturnFunctionChecker.o: Checkers.inc.h
+NoReturnFunctionChecker.o: DeclNodes.inc.h
+NoReturnFunctionChecker.o: DiagnosticCommonKinds.inc.h
+NoReturnFunctionChecker.o: StmtNodes.inc.h
+NoReturnFunctionChecker.po: AttrList.inc.h
+NoReturnFunctionChecker.po: Attrs.inc.h
+NoReturnFunctionChecker.po: Checkers.inc.h
+NoReturnFunctionChecker.po: DeclNodes.inc.h
+NoReturnFunctionChecker.po: DiagnosticCommonKinds.inc.h
+NoReturnFunctionChecker.po: StmtNodes.inc.h
+OSAtomicChecker.o: AttrList.inc.h
+OSAtomicChecker.o: Attrs.inc.h
+OSAtomicChecker.o: Checkers.inc.h
+OSAtomicChecker.o: DeclNodes.inc.h
+OSAtomicChecker.o: DiagnosticCommonKinds.inc.h
+OSAtomicChecker.o: StmtNodes.inc.h
+OSAtomicChecker.po: AttrList.inc.h
+OSAtomicChecker.po: Attrs.inc.h
+OSAtomicChecker.po: Checkers.inc.h
+OSAtomicChecker.po: DeclNodes.inc.h
+OSAtomicChecker.po: DiagnosticCommonKinds.inc.h
+OSAtomicChecker.po: StmtNodes.inc.h
+ObjCAtSyncChecker.o: AttrList.inc.h
+ObjCAtSyncChecker.o: Attrs.inc.h
+ObjCAtSyncChecker.o: Checkers.inc.h
+ObjCAtSyncChecker.o: DeclNodes.inc.h
+ObjCAtSyncChecker.o: DiagnosticCommonKinds.inc.h
+ObjCAtSyncChecker.o: StmtNodes.inc.h
+ObjCAtSyncChecker.po: AttrList.inc.h
+ObjCAtSyncChecker.po: Attrs.inc.h
+ObjCAtSyncChecker.po: Checkers.inc.h
+ObjCAtSyncChecker.po: DeclNodes.inc.h
+ObjCAtSyncChecker.po: DiagnosticCommonKinds.inc.h
+ObjCAtSyncChecker.po: StmtNodes.inc.h
+ObjCContainersASTChecker.o: AttrList.inc.h
+ObjCContainersASTChecker.o: Attrs.inc.h
+ObjCContainersASTChecker.o: Checkers.inc.h
+ObjCContainersASTChecker.o: DeclNodes.inc.h
+ObjCContainersASTChecker.o: DiagnosticCommonKinds.inc.h
+ObjCContainersASTChecker.o: StmtNodes.inc.h
+ObjCContainersASTChecker.po: AttrList.inc.h
+ObjCContainersASTChecker.po: Attrs.inc.h
+ObjCContainersASTChecker.po: Checkers.inc.h
+ObjCContainersASTChecker.po: DeclNodes.inc.h
+ObjCContainersASTChecker.po: DiagnosticCommonKinds.inc.h
+ObjCContainersASTChecker.po: StmtNodes.inc.h
+ObjCContainersChecker.o: AttrList.inc.h
+ObjCContainersChecker.o: Attrs.inc.h
+ObjCContainersChecker.o: Checkers.inc.h
+ObjCContainersChecker.o: DeclNodes.inc.h
+ObjCContainersChecker.o: DiagnosticCommonKinds.inc.h
+ObjCContainersChecker.o: StmtNodes.inc.h
+ObjCContainersChecker.po: AttrList.inc.h
+ObjCContainersChecker.po: Attrs.inc.h
+ObjCContainersChecker.po: Checkers.inc.h
+ObjCContainersChecker.po: DeclNodes.inc.h
+ObjCContainersChecker.po: DiagnosticCommonKinds.inc.h
+ObjCContainersChecker.po: StmtNodes.inc.h
+ObjCSelfInitChecker.o: AttrList.inc.h
+ObjCSelfInitChecker.o: Attrs.inc.h
+ObjCSelfInitChecker.o: Checkers.inc.h
+ObjCSelfInitChecker.o: DeclNodes.inc.h
+ObjCSelfInitChecker.o: DiagnosticCommonKinds.inc.h
+ObjCSelfInitChecker.o: StmtNodes.inc.h
+ObjCSelfInitChecker.po: AttrList.inc.h
+ObjCSelfInitChecker.po: Attrs.inc.h
+ObjCSelfInitChecker.po: Checkers.inc.h
+ObjCSelfInitChecker.po: DeclNodes.inc.h
+ObjCSelfInitChecker.po: DiagnosticCommonKinds.inc.h
+ObjCSelfInitChecker.po: StmtNodes.inc.h
+ObjCUnusedIVarsChecker.o: AttrList.inc.h
+ObjCUnusedIVarsChecker.o: Attrs.inc.h
+ObjCUnusedIVarsChecker.o: Checkers.inc.h
+ObjCUnusedIVarsChecker.o: DeclNodes.inc.h
+ObjCUnusedIVarsChecker.o: DiagnosticCommonKinds.inc.h
+ObjCUnusedIVarsChecker.o: StmtNodes.inc.h
+ObjCUnusedIVarsChecker.po: AttrList.inc.h
+ObjCUnusedIVarsChecker.po: Attrs.inc.h
+ObjCUnusedIVarsChecker.po: Checkers.inc.h
+ObjCUnusedIVarsChecker.po: DeclNodes.inc.h
+ObjCUnusedIVarsChecker.po: DiagnosticCommonKinds.inc.h
+ObjCUnusedIVarsChecker.po: StmtNodes.inc.h
+PointerArithChecker.o: AttrList.inc.h
+PointerArithChecker.o: Attrs.inc.h
+PointerArithChecker.o: Checkers.inc.h
+PointerArithChecker.o: DeclNodes.inc.h
+PointerArithChecker.o: DiagnosticCommonKinds.inc.h
+PointerArithChecker.o: StmtNodes.inc.h
+PointerArithChecker.po: AttrList.inc.h
+PointerArithChecker.po: Attrs.inc.h
+PointerArithChecker.po: Checkers.inc.h
+PointerArithChecker.po: DeclNodes.inc.h
+PointerArithChecker.po: DiagnosticCommonKinds.inc.h
+PointerArithChecker.po: StmtNodes.inc.h
+PointerSubChecker.o: AttrList.inc.h
+PointerSubChecker.o: Attrs.inc.h
+PointerSubChecker.o: Checkers.inc.h
+PointerSubChecker.o: DeclNodes.inc.h
+PointerSubChecker.o: DiagnosticCommonKinds.inc.h
+PointerSubChecker.o: StmtNodes.inc.h
+PointerSubChecker.po: AttrList.inc.h
+PointerSubChecker.po: Attrs.inc.h
+PointerSubChecker.po: Checkers.inc.h
+PointerSubChecker.po: DeclNodes.inc.h
+PointerSubChecker.po: DiagnosticCommonKinds.inc.h
+PointerSubChecker.po: StmtNodes.inc.h
+PthreadLockChecker.o: AttrList.inc.h
+PthreadLockChecker.o: Attrs.inc.h
+PthreadLockChecker.o: Checkers.inc.h
+PthreadLockChecker.o: DeclNodes.inc.h
+PthreadLockChecker.o: DiagnosticCommonKinds.inc.h
+PthreadLockChecker.o: StmtNodes.inc.h
+PthreadLockChecker.po: AttrList.inc.h
+PthreadLockChecker.po: Attrs.inc.h
+PthreadLockChecker.po: Checkers.inc.h
+PthreadLockChecker.po: DeclNodes.inc.h
+PthreadLockChecker.po: DiagnosticCommonKinds.inc.h
+PthreadLockChecker.po: StmtNodes.inc.h
+RetainCountChecker.o: AttrList.inc.h
+RetainCountChecker.o: Attrs.inc.h
+RetainCountChecker.o: Checkers.inc.h
+RetainCountChecker.o: DeclNodes.inc.h
+RetainCountChecker.o: DiagnosticCommonKinds.inc.h
+RetainCountChecker.o: StmtNodes.inc.h
+RetainCountChecker.po: AttrList.inc.h
+RetainCountChecker.po: Attrs.inc.h
+RetainCountChecker.po: Checkers.inc.h
+RetainCountChecker.po: DeclNodes.inc.h
+RetainCountChecker.po: DiagnosticCommonKinds.inc.h
+RetainCountChecker.po: StmtNodes.inc.h
+ReturnPointerRangeChecker.o: AttrList.inc.h
+ReturnPointerRangeChecker.o: Attrs.inc.h
+ReturnPointerRangeChecker.o: Checkers.inc.h
+ReturnPointerRangeChecker.o: DeclNodes.inc.h
+ReturnPointerRangeChecker.o: DiagnosticCommonKinds.inc.h
+ReturnPointerRangeChecker.o: StmtNodes.inc.h
+ReturnPointerRangeChecker.po: AttrList.inc.h
+ReturnPointerRangeChecker.po: Attrs.inc.h
+ReturnPointerRangeChecker.po: Checkers.inc.h
+ReturnPointerRangeChecker.po: DeclNodes.inc.h
+ReturnPointerRangeChecker.po: DiagnosticCommonKinds.inc.h
+ReturnPointerRangeChecker.po: StmtNodes.inc.h
+ReturnUndefChecker.o: AttrList.inc.h
+ReturnUndefChecker.o: Attrs.inc.h
+ReturnUndefChecker.o: Checkers.inc.h
+ReturnUndefChecker.o: DeclNodes.inc.h
+ReturnUndefChecker.o: DiagnosticCommonKinds.inc.h
+ReturnUndefChecker.o: StmtNodes.inc.h
+ReturnUndefChecker.po: AttrList.inc.h
+ReturnUndefChecker.po: Attrs.inc.h
+ReturnUndefChecker.po: Checkers.inc.h
+ReturnUndefChecker.po: DeclNodes.inc.h
+ReturnUndefChecker.po: DiagnosticCommonKinds.inc.h
+ReturnUndefChecker.po: StmtNodes.inc.h
+StackAddrEscapeChecker.o: AttrList.inc.h
+StackAddrEscapeChecker.o: Attrs.inc.h
+StackAddrEscapeChecker.o: Checkers.inc.h
+StackAddrEscapeChecker.o: DeclNodes.inc.h
+StackAddrEscapeChecker.o: DiagnosticCommonKinds.inc.h
+StackAddrEscapeChecker.o: StmtNodes.inc.h
+StackAddrEscapeChecker.po: AttrList.inc.h
+StackAddrEscapeChecker.po: Attrs.inc.h
+StackAddrEscapeChecker.po: Checkers.inc.h
+StackAddrEscapeChecker.po: DeclNodes.inc.h
+StackAddrEscapeChecker.po: DiagnosticCommonKinds.inc.h
+StackAddrEscapeChecker.po: StmtNodes.inc.h
+StreamChecker.o: AttrList.inc.h
+StreamChecker.o: Attrs.inc.h
+StreamChecker.o: Checkers.inc.h
+StreamChecker.o: DeclNodes.inc.h
+StreamChecker.o: DiagnosticCommonKinds.inc.h
+StreamChecker.o: StmtNodes.inc.h
+StreamChecker.po: AttrList.inc.h
+StreamChecker.po: Attrs.inc.h
+StreamChecker.po: Checkers.inc.h
+StreamChecker.po: DeclNodes.inc.h
+StreamChecker.po: DiagnosticCommonKinds.inc.h
+StreamChecker.po: StmtNodes.inc.h
+TaintTesterChecker.o: AttrList.inc.h
+TaintTesterChecker.o: Attrs.inc.h
+TaintTesterChecker.o: Checkers.inc.h
+TaintTesterChecker.o: DeclNodes.inc.h
+TaintTesterChecker.o: DiagnosticCommonKinds.inc.h
+TaintTesterChecker.o: StmtNodes.inc.h
+TaintTesterChecker.po: AttrList.inc.h
+TaintTesterChecker.po: Attrs.inc.h
+TaintTesterChecker.po: Checkers.inc.h
+TaintTesterChecker.po: DeclNodes.inc.h
+TaintTesterChecker.po: DiagnosticCommonKinds.inc.h
+TaintTesterChecker.po: StmtNodes.inc.h
+UndefBranchChecker.o: AttrList.inc.h
+UndefBranchChecker.o: Attrs.inc.h
+UndefBranchChecker.o: Checkers.inc.h
+UndefBranchChecker.o: DeclNodes.inc.h
+UndefBranchChecker.o: DiagnosticCommonKinds.inc.h
+UndefBranchChecker.o: StmtNodes.inc.h
+UndefBranchChecker.po: AttrList.inc.h
+UndefBranchChecker.po: Attrs.inc.h
+UndefBranchChecker.po: Checkers.inc.h
+UndefBranchChecker.po: DeclNodes.inc.h
+UndefBranchChecker.po: DiagnosticCommonKinds.inc.h
+UndefBranchChecker.po: StmtNodes.inc.h
+UndefCapturedBlockVarChecker.o: AttrList.inc.h
+UndefCapturedBlockVarChecker.o: Attrs.inc.h
+UndefCapturedBlockVarChecker.o: Checkers.inc.h
+UndefCapturedBlockVarChecker.o: DeclNodes.inc.h
+UndefCapturedBlockVarChecker.o: DiagnosticCommonKinds.inc.h
+UndefCapturedBlockVarChecker.o: StmtNodes.inc.h
+UndefCapturedBlockVarChecker.po: AttrList.inc.h
+UndefCapturedBlockVarChecker.po: Attrs.inc.h
+UndefCapturedBlockVarChecker.po: Checkers.inc.h
+UndefCapturedBlockVarChecker.po: DeclNodes.inc.h
+UndefCapturedBlockVarChecker.po: DiagnosticCommonKinds.inc.h
+UndefCapturedBlockVarChecker.po: StmtNodes.inc.h
+UndefResultChecker.o: AttrList.inc.h
+UndefResultChecker.o: Attrs.inc.h
+UndefResultChecker.o: Checkers.inc.h
+UndefResultChecker.o: DeclNodes.inc.h
+UndefResultChecker.o: DiagnosticCommonKinds.inc.h
+UndefResultChecker.o: StmtNodes.inc.h
+UndefResultChecker.po: AttrList.inc.h
+UndefResultChecker.po: Attrs.inc.h
+UndefResultChecker.po: Checkers.inc.h
+UndefResultChecker.po: DeclNodes.inc.h
+UndefResultChecker.po: DiagnosticCommonKinds.inc.h
+UndefResultChecker.po: StmtNodes.inc.h
+UndefinedArraySubscriptChecker.o: AttrList.inc.h
+UndefinedArraySubscriptChecker.o: Attrs.inc.h
+UndefinedArraySubscriptChecker.o: Checkers.inc.h
+UndefinedArraySubscriptChecker.o: DeclNodes.inc.h
+UndefinedArraySubscriptChecker.o: DiagnosticCommonKinds.inc.h
+UndefinedArraySubscriptChecker.o: StmtNodes.inc.h
+UndefinedArraySubscriptChecker.po: AttrList.inc.h
+UndefinedArraySubscriptChecker.po: Attrs.inc.h
+UndefinedArraySubscriptChecker.po: Checkers.inc.h
+UndefinedArraySubscriptChecker.po: DeclNodes.inc.h
+UndefinedArraySubscriptChecker.po: DiagnosticCommonKinds.inc.h
+UndefinedArraySubscriptChecker.po: StmtNodes.inc.h
+UndefinedAssignmentChecker.o: AttrList.inc.h
+UndefinedAssignmentChecker.o: Attrs.inc.h
+UndefinedAssignmentChecker.o: Checkers.inc.h
+UndefinedAssignmentChecker.o: DeclNodes.inc.h
+UndefinedAssignmentChecker.o: DiagnosticCommonKinds.inc.h
+UndefinedAssignmentChecker.o: StmtNodes.inc.h
+UndefinedAssignmentChecker.po: AttrList.inc.h
+UndefinedAssignmentChecker.po: Attrs.inc.h
+UndefinedAssignmentChecker.po: Checkers.inc.h
+UndefinedAssignmentChecker.po: DeclNodes.inc.h
+UndefinedAssignmentChecker.po: DiagnosticCommonKinds.inc.h
+UndefinedAssignmentChecker.po: StmtNodes.inc.h
+UnixAPIChecker.o: AttrList.inc.h
+UnixAPIChecker.o: Attrs.inc.h
+UnixAPIChecker.o: Checkers.inc.h
+UnixAPIChecker.o: DeclNodes.inc.h
+UnixAPIChecker.o: DiagnosticCommonKinds.inc.h
+UnixAPIChecker.o: StmtNodes.inc.h
+UnixAPIChecker.po: AttrList.inc.h
+UnixAPIChecker.po: Attrs.inc.h
+UnixAPIChecker.po: Checkers.inc.h
+UnixAPIChecker.po: DeclNodes.inc.h
+UnixAPIChecker.po: DiagnosticCommonKinds.inc.h
+UnixAPIChecker.po: StmtNodes.inc.h
+UnreachableCodeChecker.o: AttrList.inc.h
+UnreachableCodeChecker.o: Attrs.inc.h
+UnreachableCodeChecker.o: Checkers.inc.h
+UnreachableCodeChecker.o: DeclNodes.inc.h
+UnreachableCodeChecker.o: DiagnosticCommonKinds.inc.h
+UnreachableCodeChecker.o: StmtNodes.inc.h
+UnreachableCodeChecker.po: AttrList.inc.h
+UnreachableCodeChecker.po: Attrs.inc.h
+UnreachableCodeChecker.po: Checkers.inc.h
+UnreachableCodeChecker.po: DeclNodes.inc.h
+UnreachableCodeChecker.po: DiagnosticCommonKinds.inc.h
+UnreachableCodeChecker.po: StmtNodes.inc.h
+VLASizeChecker.o: AttrList.inc.h
+VLASizeChecker.o: Attrs.inc.h
+VLASizeChecker.o: Checkers.inc.h
+VLASizeChecker.o: DeclNodes.inc.h
+VLASizeChecker.o: DiagnosticCommonKinds.inc.h
+VLASizeChecker.o: StmtNodes.inc.h
+VLASizeChecker.po: AttrList.inc.h
+VLASizeChecker.po: Attrs.inc.h
+VLASizeChecker.po: Checkers.inc.h
+VLASizeChecker.po: DeclNodes.inc.h
+VLASizeChecker.po: DiagnosticCommonKinds.inc.h
+VLASizeChecker.po: StmtNodes.inc.h
+VirtualCallChecker.o: AttrList.inc.h
+VirtualCallChecker.o: Attrs.inc.h
+VirtualCallChecker.o: Checkers.inc.h
+VirtualCallChecker.o: DeclNodes.inc.h
+VirtualCallChecker.o: DiagnosticCommonKinds.inc.h
+VirtualCallChecker.o: StmtNodes.inc.h
+VirtualCallChecker.po: AttrList.inc.h
+VirtualCallChecker.po: Attrs.inc.h
+VirtualCallChecker.po: Checkers.inc.h
+VirtualCallChecker.po: DeclNodes.inc.h
+VirtualCallChecker.po: DiagnosticCommonKinds.inc.h
+VirtualCallChecker.po: StmtNodes.inc.h
+.endif
diff --git a/lib/clang/libclangstaticanalyzercore/Makefile b/lib/clang/libclangstaticanalyzercore/Makefile
index 27cdcc6..75b3d66 100644
--- a/lib/clang/libclangstaticanalyzercore/Makefile
+++ b/lib/clang/libclangstaticanalyzercore/Makefile
@@ -4,11 +4,13 @@ LIB= clangstaticanalyzercore
SRCDIR= tools/clang/lib/StaticAnalyzer/Core
SRCS= AnalysisManager.cpp \
+ APSIntType.cpp \
BasicConstraintManager.cpp \
BasicValueFactory.cpp \
BlockCounter.cpp \
BugReporter.cpp \
BugReporterVisitors.cpp \
+ CallEvent.cpp \
Checker.cpp \
CheckerContext.cpp \
CheckerHelpers.cpp \
@@ -25,7 +27,6 @@ SRCS= AnalysisManager.cpp \
FunctionSummary.cpp \
HTMLDiagnostics.cpp \
MemRegion.cpp \
- ObjCMessage.cpp \
PathDiagnostic.cpp \
PlistDiagnostics.cpp \
ProgramState.cpp \
@@ -42,6 +43,7 @@ SRCS= AnalysisManager.cpp \
TGHDRS= AttrList \
Attrs \
+ CommentNodes \
DeclNodes \
DiagnosticCommonKinds \
StmtNodes
diff --git a/lib/clang/libclangstaticanalyzercore/Makefile.depend b/lib/clang/libclangstaticanalyzercore/Makefile.depend
new file mode 100644
index 0000000..846f776
--- /dev/null
+++ b/lib/clang/libclangstaticanalyzercore/Makefile.depend
@@ -0,0 +1,365 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+AnalysisManager.o: AttrList.inc.h
+AnalysisManager.o: Attrs.inc.h
+AnalysisManager.o: DeclNodes.inc.h
+AnalysisManager.o: DiagnosticCommonKinds.inc.h
+AnalysisManager.o: StmtNodes.inc.h
+AnalysisManager.po: AttrList.inc.h
+AnalysisManager.po: Attrs.inc.h
+AnalysisManager.po: DeclNodes.inc.h
+AnalysisManager.po: DiagnosticCommonKinds.inc.h
+AnalysisManager.po: StmtNodes.inc.h
+BasicConstraintManager.o: AttrList.inc.h
+BasicConstraintManager.o: Attrs.inc.h
+BasicConstraintManager.o: DeclNodes.inc.h
+BasicConstraintManager.o: DiagnosticCommonKinds.inc.h
+BasicConstraintManager.o: StmtNodes.inc.h
+BasicConstraintManager.po: AttrList.inc.h
+BasicConstraintManager.po: Attrs.inc.h
+BasicConstraintManager.po: DeclNodes.inc.h
+BasicConstraintManager.po: DiagnosticCommonKinds.inc.h
+BasicConstraintManager.po: StmtNodes.inc.h
+BasicValueFactory.o: AttrList.inc.h
+BasicValueFactory.o: Attrs.inc.h
+BasicValueFactory.o: DeclNodes.inc.h
+BasicValueFactory.o: DiagnosticCommonKinds.inc.h
+BasicValueFactory.o: StmtNodes.inc.h
+BasicValueFactory.po: AttrList.inc.h
+BasicValueFactory.po: Attrs.inc.h
+BasicValueFactory.po: DeclNodes.inc.h
+BasicValueFactory.po: DiagnosticCommonKinds.inc.h
+BasicValueFactory.po: StmtNodes.inc.h
+BugReporter.o: AttrList.inc.h
+BugReporter.o: Attrs.inc.h
+BugReporter.o: DeclNodes.inc.h
+BugReporter.o: DiagnosticCommonKinds.inc.h
+BugReporter.o: StmtNodes.inc.h
+BugReporter.po: AttrList.inc.h
+BugReporter.po: Attrs.inc.h
+BugReporter.po: DeclNodes.inc.h
+BugReporter.po: DiagnosticCommonKinds.inc.h
+BugReporter.po: StmtNodes.inc.h
+BugReporterVisitors.o: AttrList.inc.h
+BugReporterVisitors.o: Attrs.inc.h
+BugReporterVisitors.o: DeclNodes.inc.h
+BugReporterVisitors.o: DiagnosticCommonKinds.inc.h
+BugReporterVisitors.o: StmtNodes.inc.h
+BugReporterVisitors.po: AttrList.inc.h
+BugReporterVisitors.po: Attrs.inc.h
+BugReporterVisitors.po: DeclNodes.inc.h
+BugReporterVisitors.po: DiagnosticCommonKinds.inc.h
+BugReporterVisitors.po: StmtNodes.inc.h
+Checker.o: AttrList.inc.h
+Checker.o: Attrs.inc.h
+Checker.o: DeclNodes.inc.h
+Checker.o: DiagnosticCommonKinds.inc.h
+Checker.o: StmtNodes.inc.h
+Checker.po: AttrList.inc.h
+Checker.po: Attrs.inc.h
+Checker.po: DeclNodes.inc.h
+Checker.po: DiagnosticCommonKinds.inc.h
+Checker.po: StmtNodes.inc.h
+CheckerContext.o: AttrList.inc.h
+CheckerContext.o: Attrs.inc.h
+CheckerContext.o: DeclNodes.inc.h
+CheckerContext.o: DiagnosticCommonKinds.inc.h
+CheckerContext.o: StmtNodes.inc.h
+CheckerContext.po: AttrList.inc.h
+CheckerContext.po: Attrs.inc.h
+CheckerContext.po: DeclNodes.inc.h
+CheckerContext.po: DiagnosticCommonKinds.inc.h
+CheckerContext.po: StmtNodes.inc.h
+CheckerHelpers.o: AttrList.inc.h
+CheckerHelpers.o: Attrs.inc.h
+CheckerHelpers.o: DeclNodes.inc.h
+CheckerHelpers.o: DiagnosticCommonKinds.inc.h
+CheckerHelpers.o: StmtNodes.inc.h
+CheckerHelpers.po: AttrList.inc.h
+CheckerHelpers.po: Attrs.inc.h
+CheckerHelpers.po: DeclNodes.inc.h
+CheckerHelpers.po: DiagnosticCommonKinds.inc.h
+CheckerHelpers.po: StmtNodes.inc.h
+CheckerManager.o: AttrList.inc.h
+CheckerManager.o: Attrs.inc.h
+CheckerManager.o: DeclNodes.inc.h
+CheckerManager.o: DiagnosticCommonKinds.inc.h
+CheckerManager.o: StmtNodes.inc.h
+CheckerManager.po: AttrList.inc.h
+CheckerManager.po: Attrs.inc.h
+CheckerManager.po: DeclNodes.inc.h
+CheckerManager.po: DiagnosticCommonKinds.inc.h
+CheckerManager.po: StmtNodes.inc.h
+CheckerRegistry.o: AttrList.inc.h
+CheckerRegistry.o: Attrs.inc.h
+CheckerRegistry.o: DeclNodes.inc.h
+CheckerRegistry.o: DiagnosticCommonKinds.inc.h
+CheckerRegistry.o: StmtNodes.inc.h
+CheckerRegistry.po: AttrList.inc.h
+CheckerRegistry.po: Attrs.inc.h
+CheckerRegistry.po: DeclNodes.inc.h
+CheckerRegistry.po: DiagnosticCommonKinds.inc.h
+CheckerRegistry.po: StmtNodes.inc.h
+CoreEngine.o: AttrList.inc.h
+CoreEngine.o: Attrs.inc.h
+CoreEngine.o: DeclNodes.inc.h
+CoreEngine.o: DiagnosticCommonKinds.inc.h
+CoreEngine.o: StmtNodes.inc.h
+CoreEngine.po: AttrList.inc.h
+CoreEngine.po: Attrs.inc.h
+CoreEngine.po: DeclNodes.inc.h
+CoreEngine.po: DiagnosticCommonKinds.inc.h
+CoreEngine.po: StmtNodes.inc.h
+Environment.o: AttrList.inc.h
+Environment.o: Attrs.inc.h
+Environment.o: DeclNodes.inc.h
+Environment.o: DiagnosticCommonKinds.inc.h
+Environment.o: StmtNodes.inc.h
+Environment.po: AttrList.inc.h
+Environment.po: Attrs.inc.h
+Environment.po: DeclNodes.inc.h
+Environment.po: DiagnosticCommonKinds.inc.h
+Environment.po: StmtNodes.inc.h
+ExplodedGraph.o: AttrList.inc.h
+ExplodedGraph.o: Attrs.inc.h
+ExplodedGraph.o: DeclNodes.inc.h
+ExplodedGraph.o: DiagnosticCommonKinds.inc.h
+ExplodedGraph.o: StmtNodes.inc.h
+ExplodedGraph.po: AttrList.inc.h
+ExplodedGraph.po: Attrs.inc.h
+ExplodedGraph.po: DeclNodes.inc.h
+ExplodedGraph.po: DiagnosticCommonKinds.inc.h
+ExplodedGraph.po: StmtNodes.inc.h
+ExprEngine.o: AttrList.inc.h
+ExprEngine.o: Attrs.inc.h
+ExprEngine.o: DeclNodes.inc.h
+ExprEngine.o: DiagnosticCommonKinds.inc.h
+ExprEngine.o: StmtNodes.inc.h
+ExprEngine.po: AttrList.inc.h
+ExprEngine.po: Attrs.inc.h
+ExprEngine.po: DeclNodes.inc.h
+ExprEngine.po: DiagnosticCommonKinds.inc.h
+ExprEngine.po: StmtNodes.inc.h
+ExprEngineC.o: AttrList.inc.h
+ExprEngineC.o: Attrs.inc.h
+ExprEngineC.o: DeclNodes.inc.h
+ExprEngineC.o: DiagnosticCommonKinds.inc.h
+ExprEngineC.o: StmtNodes.inc.h
+ExprEngineC.po: AttrList.inc.h
+ExprEngineC.po: Attrs.inc.h
+ExprEngineC.po: DeclNodes.inc.h
+ExprEngineC.po: DiagnosticCommonKinds.inc.h
+ExprEngineC.po: StmtNodes.inc.h
+ExprEngineCXX.o: AttrList.inc.h
+ExprEngineCXX.o: Attrs.inc.h
+ExprEngineCXX.o: DeclNodes.inc.h
+ExprEngineCXX.o: DiagnosticCommonKinds.inc.h
+ExprEngineCXX.o: StmtNodes.inc.h
+ExprEngineCXX.po: AttrList.inc.h
+ExprEngineCXX.po: Attrs.inc.h
+ExprEngineCXX.po: DeclNodes.inc.h
+ExprEngineCXX.po: DiagnosticCommonKinds.inc.h
+ExprEngineCXX.po: StmtNodes.inc.h
+ExprEngineCallAndReturn.o: AttrList.inc.h
+ExprEngineCallAndReturn.o: Attrs.inc.h
+ExprEngineCallAndReturn.o: DeclNodes.inc.h
+ExprEngineCallAndReturn.o: DiagnosticCommonKinds.inc.h
+ExprEngineCallAndReturn.o: StmtNodes.inc.h
+ExprEngineCallAndReturn.po: AttrList.inc.h
+ExprEngineCallAndReturn.po: Attrs.inc.h
+ExprEngineCallAndReturn.po: DeclNodes.inc.h
+ExprEngineCallAndReturn.po: DiagnosticCommonKinds.inc.h
+ExprEngineCallAndReturn.po: StmtNodes.inc.h
+ExprEngineObjC.o: AttrList.inc.h
+ExprEngineObjC.o: Attrs.inc.h
+ExprEngineObjC.o: DeclNodes.inc.h
+ExprEngineObjC.o: DiagnosticCommonKinds.inc.h
+ExprEngineObjC.o: StmtNodes.inc.h
+ExprEngineObjC.po: AttrList.inc.h
+ExprEngineObjC.po: Attrs.inc.h
+ExprEngineObjC.po: DeclNodes.inc.h
+ExprEngineObjC.po: DiagnosticCommonKinds.inc.h
+ExprEngineObjC.po: StmtNodes.inc.h
+FunctionSummary.o: AttrList.inc.h
+FunctionSummary.o: Attrs.inc.h
+FunctionSummary.o: DeclNodes.inc.h
+FunctionSummary.o: DiagnosticCommonKinds.inc.h
+FunctionSummary.po: AttrList.inc.h
+FunctionSummary.po: Attrs.inc.h
+FunctionSummary.po: DeclNodes.inc.h
+FunctionSummary.po: DiagnosticCommonKinds.inc.h
+HTMLDiagnostics.o: AttrList.inc.h
+HTMLDiagnostics.o: Attrs.inc.h
+HTMLDiagnostics.o: DeclNodes.inc.h
+HTMLDiagnostics.o: DiagnosticCommonKinds.inc.h
+HTMLDiagnostics.o: StmtNodes.inc.h
+HTMLDiagnostics.po: AttrList.inc.h
+HTMLDiagnostics.po: Attrs.inc.h
+HTMLDiagnostics.po: DeclNodes.inc.h
+HTMLDiagnostics.po: DiagnosticCommonKinds.inc.h
+HTMLDiagnostics.po: StmtNodes.inc.h
+MemRegion.o: AttrList.inc.h
+MemRegion.o: Attrs.inc.h
+MemRegion.o: DeclNodes.inc.h
+MemRegion.o: DiagnosticCommonKinds.inc.h
+MemRegion.o: StmtNodes.inc.h
+MemRegion.po: AttrList.inc.h
+MemRegion.po: Attrs.inc.h
+MemRegion.po: DeclNodes.inc.h
+MemRegion.po: DiagnosticCommonKinds.inc.h
+MemRegion.po: StmtNodes.inc.h
+ObjCMessage.o: AttrList.inc.h
+ObjCMessage.o: Attrs.inc.h
+ObjCMessage.o: DeclNodes.inc.h
+ObjCMessage.o: DiagnosticCommonKinds.inc.h
+ObjCMessage.o: StmtNodes.inc.h
+ObjCMessage.po: AttrList.inc.h
+ObjCMessage.po: Attrs.inc.h
+ObjCMessage.po: DeclNodes.inc.h
+ObjCMessage.po: DiagnosticCommonKinds.inc.h
+ObjCMessage.po: StmtNodes.inc.h
+PathDiagnostic.o: AttrList.inc.h
+PathDiagnostic.o: Attrs.inc.h
+PathDiagnostic.o: DeclNodes.inc.h
+PathDiagnostic.o: DiagnosticCommonKinds.inc.h
+PathDiagnostic.o: StmtNodes.inc.h
+PathDiagnostic.po: AttrList.inc.h
+PathDiagnostic.po: Attrs.inc.h
+PathDiagnostic.po: DeclNodes.inc.h
+PathDiagnostic.po: DiagnosticCommonKinds.inc.h
+PathDiagnostic.po: StmtNodes.inc.h
+PlistDiagnostics.o: AttrList.inc.h
+PlistDiagnostics.o: Attrs.inc.h
+PlistDiagnostics.o: DeclNodes.inc.h
+PlistDiagnostics.o: DiagnosticCommonKinds.inc.h
+PlistDiagnostics.o: StmtNodes.inc.h
+PlistDiagnostics.po: AttrList.inc.h
+PlistDiagnostics.po: Attrs.inc.h
+PlistDiagnostics.po: DeclNodes.inc.h
+PlistDiagnostics.po: DiagnosticCommonKinds.inc.h
+PlistDiagnostics.po: StmtNodes.inc.h
+ProgramState.o: AttrList.inc.h
+ProgramState.o: Attrs.inc.h
+ProgramState.o: DeclNodes.inc.h
+ProgramState.o: DiagnosticCommonKinds.inc.h
+ProgramState.o: StmtNodes.inc.h
+ProgramState.po: AttrList.inc.h
+ProgramState.po: Attrs.inc.h
+ProgramState.po: DeclNodes.inc.h
+ProgramState.po: DiagnosticCommonKinds.inc.h
+ProgramState.po: StmtNodes.inc.h
+RangeConstraintManager.o: AttrList.inc.h
+RangeConstraintManager.o: Attrs.inc.h
+RangeConstraintManager.o: DeclNodes.inc.h
+RangeConstraintManager.o: DiagnosticCommonKinds.inc.h
+RangeConstraintManager.o: StmtNodes.inc.h
+RangeConstraintManager.po: AttrList.inc.h
+RangeConstraintManager.po: Attrs.inc.h
+RangeConstraintManager.po: DeclNodes.inc.h
+RangeConstraintManager.po: DiagnosticCommonKinds.inc.h
+RangeConstraintManager.po: StmtNodes.inc.h
+RegionStore.o: AttrList.inc.h
+RegionStore.o: Attrs.inc.h
+RegionStore.o: DeclNodes.inc.h
+RegionStore.o: DiagnosticCommonKinds.inc.h
+RegionStore.o: StmtNodes.inc.h
+RegionStore.po: AttrList.inc.h
+RegionStore.po: Attrs.inc.h
+RegionStore.po: DeclNodes.inc.h
+RegionStore.po: DiagnosticCommonKinds.inc.h
+RegionStore.po: StmtNodes.inc.h
+SValBuilder.o: AttrList.inc.h
+SValBuilder.o: Attrs.inc.h
+SValBuilder.o: DeclNodes.inc.h
+SValBuilder.o: DiagnosticCommonKinds.inc.h
+SValBuilder.o: StmtNodes.inc.h
+SValBuilder.po: AttrList.inc.h
+SValBuilder.po: Attrs.inc.h
+SValBuilder.po: DeclNodes.inc.h
+SValBuilder.po: DiagnosticCommonKinds.inc.h
+SValBuilder.po: StmtNodes.inc.h
+SVals.o: AttrList.inc.h
+SVals.o: Attrs.inc.h
+SVals.o: DeclNodes.inc.h
+SVals.o: DiagnosticCommonKinds.inc.h
+SVals.o: StmtNodes.inc.h
+SVals.po: AttrList.inc.h
+SVals.po: Attrs.inc.h
+SVals.po: DeclNodes.inc.h
+SVals.po: DiagnosticCommonKinds.inc.h
+SVals.po: StmtNodes.inc.h
+SimpleConstraintManager.o: AttrList.inc.h
+SimpleConstraintManager.o: Attrs.inc.h
+SimpleConstraintManager.o: DeclNodes.inc.h
+SimpleConstraintManager.o: DiagnosticCommonKinds.inc.h
+SimpleConstraintManager.o: StmtNodes.inc.h
+SimpleConstraintManager.po: AttrList.inc.h
+SimpleConstraintManager.po: Attrs.inc.h
+SimpleConstraintManager.po: DeclNodes.inc.h
+SimpleConstraintManager.po: DiagnosticCommonKinds.inc.h
+SimpleConstraintManager.po: StmtNodes.inc.h
+SimpleSValBuilder.o: AttrList.inc.h
+SimpleSValBuilder.o: Attrs.inc.h
+SimpleSValBuilder.o: DeclNodes.inc.h
+SimpleSValBuilder.o: DiagnosticCommonKinds.inc.h
+SimpleSValBuilder.o: StmtNodes.inc.h
+SimpleSValBuilder.po: AttrList.inc.h
+SimpleSValBuilder.po: Attrs.inc.h
+SimpleSValBuilder.po: DeclNodes.inc.h
+SimpleSValBuilder.po: DiagnosticCommonKinds.inc.h
+SimpleSValBuilder.po: StmtNodes.inc.h
+Store.o: AttrList.inc.h
+Store.o: Attrs.inc.h
+Store.o: DeclNodes.inc.h
+Store.o: DiagnosticCommonKinds.inc.h
+Store.o: StmtNodes.inc.h
+Store.po: AttrList.inc.h
+Store.po: Attrs.inc.h
+Store.po: DeclNodes.inc.h
+Store.po: DiagnosticCommonKinds.inc.h
+Store.po: StmtNodes.inc.h
+SubEngine.o: AttrList.inc.h
+SubEngine.o: Attrs.inc.h
+SubEngine.o: DeclNodes.inc.h
+SubEngine.o: DiagnosticCommonKinds.inc.h
+SubEngine.o: StmtNodes.inc.h
+SubEngine.po: AttrList.inc.h
+SubEngine.po: Attrs.inc.h
+SubEngine.po: DeclNodes.inc.h
+SubEngine.po: DiagnosticCommonKinds.inc.h
+SubEngine.po: StmtNodes.inc.h
+SymbolManager.o: AttrList.inc.h
+SymbolManager.o: Attrs.inc.h
+SymbolManager.o: DeclNodes.inc.h
+SymbolManager.o: DiagnosticCommonKinds.inc.h
+SymbolManager.o: StmtNodes.inc.h
+SymbolManager.po: AttrList.inc.h
+SymbolManager.po: Attrs.inc.h
+SymbolManager.po: DeclNodes.inc.h
+SymbolManager.po: DiagnosticCommonKinds.inc.h
+SymbolManager.po: StmtNodes.inc.h
+TextPathDiagnostics.o: AttrList.inc.h
+TextPathDiagnostics.o: Attrs.inc.h
+TextPathDiagnostics.o: DeclNodes.inc.h
+TextPathDiagnostics.o: DiagnosticCommonKinds.inc.h
+TextPathDiagnostics.o: StmtNodes.inc.h
+TextPathDiagnostics.po: AttrList.inc.h
+TextPathDiagnostics.po: Attrs.inc.h
+TextPathDiagnostics.po: DeclNodes.inc.h
+TextPathDiagnostics.po: DiagnosticCommonKinds.inc.h
+TextPathDiagnostics.po: StmtNodes.inc.h
+.endif
diff --git a/lib/clang/libclangstaticanalyzerfrontend/Makefile b/lib/clang/libclangstaticanalyzerfrontend/Makefile
index 1256743..5c7cd41 100644
--- a/lib/clang/libclangstaticanalyzerfrontend/Makefile
+++ b/lib/clang/libclangstaticanalyzerfrontend/Makefile
@@ -10,6 +10,7 @@ SRCS= AnalysisConsumer.cpp \
TGHDRS= AttrList \
Attrs \
Checkers \
+ CommentNodes \
DeclNodes \
DiagnosticCommonKinds \
DiagnosticFrontendKinds \
diff --git a/lib/clang/libclangstaticanalyzerfrontend/Makefile.depend b/lib/clang/libclangstaticanalyzerfrontend/Makefile.depend
new file mode 100644
index 0000000..bcae1ef
--- /dev/null
+++ b/lib/clang/libclangstaticanalyzerfrontend/Makefile.depend
@@ -0,0 +1,41 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+AnalysisConsumer.o: AttrList.inc.h
+AnalysisConsumer.o: Attrs.inc.h
+AnalysisConsumer.o: DeclNodes.inc.h
+AnalysisConsumer.o: DiagnosticCommonKinds.inc.h
+AnalysisConsumer.o: StmtNodes.inc.h
+AnalysisConsumer.po: AttrList.inc.h
+AnalysisConsumer.po: Attrs.inc.h
+AnalysisConsumer.po: DeclNodes.inc.h
+AnalysisConsumer.po: DiagnosticCommonKinds.inc.h
+AnalysisConsumer.po: StmtNodes.inc.h
+CheckerRegistration.o: AttrList.inc.h
+CheckerRegistration.o: Attrs.inc.h
+CheckerRegistration.o: DeclNodes.inc.h
+CheckerRegistration.o: DiagnosticCommonKinds.inc.h
+CheckerRegistration.o: DiagnosticFrontendKinds.inc.h
+CheckerRegistration.o: StmtNodes.inc.h
+CheckerRegistration.po: AttrList.inc.h
+CheckerRegistration.po: Attrs.inc.h
+CheckerRegistration.po: DeclNodes.inc.h
+CheckerRegistration.po: DiagnosticCommonKinds.inc.h
+CheckerRegistration.po: DiagnosticFrontendKinds.inc.h
+CheckerRegistration.po: StmtNodes.inc.h
+FrontendActions.o: DiagnosticCommonKinds.inc.h
+FrontendActions.po: DiagnosticCommonKinds.inc.h
+.endif
diff --git a/lib/clang/libllvmanalysis/Makefile b/lib/clang/libllvmanalysis/Makefile
index a05dac5..cb1e345 100644
--- a/lib/clang/libllvmanalysis/Makefile
+++ b/lib/clang/libllvmanalysis/Makefile
@@ -18,9 +18,7 @@ SRCS= AliasAnalysis.cpp \
CaptureTracking.cpp \
CodeMetrics.cpp \
ConstantFolding.cpp \
- DIBuilder.cpp \
DbgInfoPrinter.cpp \
- DebugInfo.cpp \
DomPrinter.cpp \
DominanceFrontier.cpp \
IVUsers.cpp \
diff --git a/lib/clang/libllvmanalysis/Makefile.depend b/lib/clang/libllvmanalysis/Makefile.depend
new file mode 100644
index 0000000..be777d8
--- /dev/null
+++ b/lib/clang/libllvmanalysis/Makefile.depend
@@ -0,0 +1,47 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+AliasAnalysis.o: Intrinsics.inc.h
+AliasAnalysis.po: Intrinsics.inc.h
+AliasSetTracker.o: Intrinsics.inc.h
+AliasSetTracker.po: Intrinsics.inc.h
+BasicAliasAnalysis.o: Intrinsics.inc.h
+BasicAliasAnalysis.po: Intrinsics.inc.h
+CodeMetrics.o: Intrinsics.inc.h
+CodeMetrics.po: Intrinsics.inc.h
+ConstantFolding.o: Intrinsics.inc.h
+ConstantFolding.po: Intrinsics.inc.h
+DIBuilder.o: Intrinsics.inc.h
+DIBuilder.po: Intrinsics.inc.h
+DbgInfoPrinter.o: Intrinsics.inc.h
+DbgInfoPrinter.po: Intrinsics.inc.h
+DebugInfo.o: Intrinsics.inc.h
+DebugInfo.po: Intrinsics.inc.h
+InlineCost.o: Intrinsics.inc.h
+InlineCost.po: Intrinsics.inc.h
+LazyValueInfo.o: Intrinsics.inc.h
+LazyValueInfo.po: Intrinsics.inc.h
+Lint.o: Intrinsics.inc.h
+Lint.po: Intrinsics.inc.h
+Loads.o: Intrinsics.inc.h
+Loads.po: Intrinsics.inc.h
+MemoryDependenceAnalysis.o: Intrinsics.inc.h
+MemoryDependenceAnalysis.po: Intrinsics.inc.h
+ScalarEvolutionExpander.o: Intrinsics.inc.h
+ScalarEvolutionExpander.po: Intrinsics.inc.h
+ValueTracking.o: Intrinsics.inc.h
+ValueTracking.po: Intrinsics.inc.h
+.endif
diff --git a/lib/clang/libllvmarchive/Makefile.depend b/lib/clang/libllvmarchive/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmarchive/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmarmasmparser/Makefile.depend b/lib/clang/libllvmarmasmparser/Makefile.depend
new file mode 100644
index 0000000..d4e4af4
--- /dev/null
+++ b/lib/clang/libllvmarmasmparser/Makefile.depend
@@ -0,0 +1,31 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+ARMAsmLexer.o: ARMGenInstrInfo.inc.h
+ARMAsmLexer.o: ARMGenRegisterInfo.inc.h
+ARMAsmLexer.o: ARMGenSubtargetInfo.inc.h
+ARMAsmLexer.po: ARMGenInstrInfo.inc.h
+ARMAsmLexer.po: ARMGenRegisterInfo.inc.h
+ARMAsmLexer.po: ARMGenSubtargetInfo.inc.h
+ARMAsmParser.o: ARMGenAsmMatcher.inc.h
+ARMAsmParser.o: ARMGenInstrInfo.inc.h
+ARMAsmParser.o: ARMGenRegisterInfo.inc.h
+ARMAsmParser.o: ARMGenSubtargetInfo.inc.h
+ARMAsmParser.po: ARMGenAsmMatcher.inc.h
+ARMAsmParser.po: ARMGenInstrInfo.inc.h
+ARMAsmParser.po: ARMGenRegisterInfo.inc.h
+ARMAsmParser.po: ARMGenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmarmcodegen/Makefile.depend b/lib/clang/libllvmarmcodegen/Makefile.depend
new file mode 100644
index 0000000..abc1e04
--- /dev/null
+++ b/lib/clang/libllvmarmcodegen/Makefile.depend
@@ -0,0 +1,209 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+ARMAsmPrinter.o: ARMGenInstrInfo.inc.h
+ARMAsmPrinter.o: ARMGenMCPseudoLowering.inc.h
+ARMAsmPrinter.o: ARMGenRegisterInfo.inc.h
+ARMAsmPrinter.o: ARMGenSubtargetInfo.inc.h
+ARMAsmPrinter.po: ARMGenInstrInfo.inc.h
+ARMAsmPrinter.po: ARMGenMCPseudoLowering.inc.h
+ARMAsmPrinter.po: ARMGenRegisterInfo.inc.h
+ARMAsmPrinter.po: ARMGenSubtargetInfo.inc.h
+ARMBaseInstrInfo.o: ARMGenInstrInfo.inc.h
+ARMBaseInstrInfo.o: ARMGenRegisterInfo.inc.h
+ARMBaseInstrInfo.o: ARMGenSubtargetInfo.inc.h
+ARMBaseInstrInfo.po: ARMGenInstrInfo.inc.h
+ARMBaseInstrInfo.po: ARMGenRegisterInfo.inc.h
+ARMBaseInstrInfo.po: ARMGenSubtargetInfo.inc.h
+ARMBaseRegisterInfo.o: ARMGenInstrInfo.inc.h
+ARMBaseRegisterInfo.o: ARMGenRegisterInfo.inc.h
+ARMBaseRegisterInfo.o: ARMGenSubtargetInfo.inc.h
+ARMBaseRegisterInfo.po: ARMGenInstrInfo.inc.h
+ARMBaseRegisterInfo.po: ARMGenRegisterInfo.inc.h
+ARMBaseRegisterInfo.po: ARMGenSubtargetInfo.inc.h
+ARMCodeEmitter.o: ARMGenCodeEmitter.inc.h
+ARMCodeEmitter.o: ARMGenInstrInfo.inc.h
+ARMCodeEmitter.o: ARMGenRegisterInfo.inc.h
+ARMCodeEmitter.o: ARMGenSubtargetInfo.inc.h
+ARMCodeEmitter.po: ARMGenCodeEmitter.inc.h
+ARMCodeEmitter.po: ARMGenInstrInfo.inc.h
+ARMCodeEmitter.po: ARMGenRegisterInfo.inc.h
+ARMCodeEmitter.po: ARMGenSubtargetInfo.inc.h
+ARMConstantIslandPass.o: ARMGenInstrInfo.inc.h
+ARMConstantIslandPass.o: ARMGenRegisterInfo.inc.h
+ARMConstantIslandPass.o: ARMGenSubtargetInfo.inc.h
+ARMConstantIslandPass.po: ARMGenInstrInfo.inc.h
+ARMConstantIslandPass.po: ARMGenRegisterInfo.inc.h
+ARMConstantIslandPass.po: ARMGenSubtargetInfo.inc.h
+ARMExpandPseudoInsts.o: ARMGenInstrInfo.inc.h
+ARMExpandPseudoInsts.o: ARMGenRegisterInfo.inc.h
+ARMExpandPseudoInsts.o: ARMGenSubtargetInfo.inc.h
+ARMExpandPseudoInsts.po: ARMGenInstrInfo.inc.h
+ARMExpandPseudoInsts.po: ARMGenRegisterInfo.inc.h
+ARMExpandPseudoInsts.po: ARMGenSubtargetInfo.inc.h
+ARMFastISel.o: ARMGenCallingConv.inc.h
+ARMFastISel.o: ARMGenFastISel.inc.h
+ARMFastISel.o: ARMGenInstrInfo.inc.h
+ARMFastISel.o: ARMGenRegisterInfo.inc.h
+ARMFastISel.o: ARMGenSubtargetInfo.inc.h
+ARMFastISel.o: Intrinsics.inc.h
+ARMFastISel.po: ARMGenCallingConv.inc.h
+ARMFastISel.po: ARMGenFastISel.inc.h
+ARMFastISel.po: ARMGenInstrInfo.inc.h
+ARMFastISel.po: ARMGenRegisterInfo.inc.h
+ARMFastISel.po: ARMGenSubtargetInfo.inc.h
+ARMFastISel.po: Intrinsics.inc.h
+ARMFrameLowering.o: ARMGenInstrInfo.inc.h
+ARMFrameLowering.o: ARMGenRegisterInfo.inc.h
+ARMFrameLowering.o: ARMGenSubtargetInfo.inc.h
+ARMFrameLowering.po: ARMGenInstrInfo.inc.h
+ARMFrameLowering.po: ARMGenRegisterInfo.inc.h
+ARMFrameLowering.po: ARMGenSubtargetInfo.inc.h
+ARMHazardRecognizer.o: ARMGenInstrInfo.inc.h
+ARMHazardRecognizer.o: ARMGenRegisterInfo.inc.h
+ARMHazardRecognizer.o: ARMGenSubtargetInfo.inc.h
+ARMHazardRecognizer.po: ARMGenInstrInfo.inc.h
+ARMHazardRecognizer.po: ARMGenRegisterInfo.inc.h
+ARMHazardRecognizer.po: ARMGenSubtargetInfo.inc.h
+ARMISelDAGToDAG.o: ARMGenDAGISel.inc.h
+ARMISelDAGToDAG.o: ARMGenInstrInfo.inc.h
+ARMISelDAGToDAG.o: ARMGenRegisterInfo.inc.h
+ARMISelDAGToDAG.o: ARMGenSubtargetInfo.inc.h
+ARMISelDAGToDAG.o: Intrinsics.inc.h
+ARMISelDAGToDAG.po: ARMGenDAGISel.inc.h
+ARMISelDAGToDAG.po: ARMGenInstrInfo.inc.h
+ARMISelDAGToDAG.po: ARMGenRegisterInfo.inc.h
+ARMISelDAGToDAG.po: ARMGenSubtargetInfo.inc.h
+ARMISelDAGToDAG.po: Intrinsics.inc.h
+ARMISelLowering.o: ARMGenCallingConv.inc.h
+ARMISelLowering.o: ARMGenInstrInfo.inc.h
+ARMISelLowering.o: ARMGenRegisterInfo.inc.h
+ARMISelLowering.o: ARMGenSubtargetInfo.inc.h
+ARMISelLowering.o: Intrinsics.inc.h
+ARMISelLowering.po: ARMGenCallingConv.inc.h
+ARMISelLowering.po: ARMGenInstrInfo.inc.h
+ARMISelLowering.po: ARMGenRegisterInfo.inc.h
+ARMISelLowering.po: ARMGenSubtargetInfo.inc.h
+ARMISelLowering.po: Intrinsics.inc.h
+ARMInstrInfo.o: ARMGenInstrInfo.inc.h
+ARMInstrInfo.o: ARMGenRegisterInfo.inc.h
+ARMInstrInfo.o: ARMGenSubtargetInfo.inc.h
+ARMInstrInfo.po: ARMGenInstrInfo.inc.h
+ARMInstrInfo.po: ARMGenRegisterInfo.inc.h
+ARMInstrInfo.po: ARMGenSubtargetInfo.inc.h
+ARMJITInfo.o: ARMGenInstrInfo.inc.h
+ARMJITInfo.o: ARMGenRegisterInfo.inc.h
+ARMJITInfo.o: ARMGenSubtargetInfo.inc.h
+ARMJITInfo.po: ARMGenInstrInfo.inc.h
+ARMJITInfo.po: ARMGenRegisterInfo.inc.h
+ARMJITInfo.po: ARMGenSubtargetInfo.inc.h
+ARMLoadStoreOptimizer.o: ARMGenInstrInfo.inc.h
+ARMLoadStoreOptimizer.o: ARMGenRegisterInfo.inc.h
+ARMLoadStoreOptimizer.o: ARMGenSubtargetInfo.inc.h
+ARMLoadStoreOptimizer.po: ARMGenInstrInfo.inc.h
+ARMLoadStoreOptimizer.po: ARMGenRegisterInfo.inc.h
+ARMLoadStoreOptimizer.po: ARMGenSubtargetInfo.inc.h
+ARMMCInstLower.o: ARMGenInstrInfo.inc.h
+ARMMCInstLower.o: ARMGenRegisterInfo.inc.h
+ARMMCInstLower.o: ARMGenSubtargetInfo.inc.h
+ARMMCInstLower.po: ARMGenInstrInfo.inc.h
+ARMMCInstLower.po: ARMGenRegisterInfo.inc.h
+ARMMCInstLower.po: ARMGenSubtargetInfo.inc.h
+ARMMachineFunctionInfo.o: ARMGenInstrInfo.inc.h
+ARMMachineFunctionInfo.o: ARMGenRegisterInfo.inc.h
+ARMMachineFunctionInfo.o: ARMGenSubtargetInfo.inc.h
+ARMMachineFunctionInfo.po: ARMGenInstrInfo.inc.h
+ARMMachineFunctionInfo.po: ARMGenRegisterInfo.inc.h
+ARMMachineFunctionInfo.po: ARMGenSubtargetInfo.inc.h
+ARMRegisterInfo.o: ARMGenInstrInfo.inc.h
+ARMRegisterInfo.o: ARMGenRegisterInfo.inc.h
+ARMRegisterInfo.o: ARMGenSubtargetInfo.inc.h
+ARMRegisterInfo.po: ARMGenInstrInfo.inc.h
+ARMRegisterInfo.po: ARMGenRegisterInfo.inc.h
+ARMRegisterInfo.po: ARMGenSubtargetInfo.inc.h
+ARMSelectionDAGInfo.o: ARMGenInstrInfo.inc.h
+ARMSelectionDAGInfo.o: ARMGenRegisterInfo.inc.h
+ARMSelectionDAGInfo.o: ARMGenSubtargetInfo.inc.h
+ARMSelectionDAGInfo.po: ARMGenInstrInfo.inc.h
+ARMSelectionDAGInfo.po: ARMGenRegisterInfo.inc.h
+ARMSelectionDAGInfo.po: ARMGenSubtargetInfo.inc.h
+ARMSubtarget.o: ARMGenInstrInfo.inc.h
+ARMSubtarget.o: ARMGenRegisterInfo.inc.h
+ARMSubtarget.o: ARMGenSubtargetInfo.inc.h
+ARMSubtarget.po: ARMGenInstrInfo.inc.h
+ARMSubtarget.po: ARMGenRegisterInfo.inc.h
+ARMSubtarget.po: ARMGenSubtargetInfo.inc.h
+ARMTargetMachine.o: ARMGenInstrInfo.inc.h
+ARMTargetMachine.o: ARMGenRegisterInfo.inc.h
+ARMTargetMachine.o: ARMGenSubtargetInfo.inc.h
+ARMTargetMachine.po: ARMGenInstrInfo.inc.h
+ARMTargetMachine.po: ARMGenRegisterInfo.inc.h
+ARMTargetMachine.po: ARMGenSubtargetInfo.inc.h
+ARMTargetObjectFile.o: ARMGenInstrInfo.inc.h
+ARMTargetObjectFile.o: ARMGenRegisterInfo.inc.h
+ARMTargetObjectFile.o: ARMGenSubtargetInfo.inc.h
+ARMTargetObjectFile.po: ARMGenInstrInfo.inc.h
+ARMTargetObjectFile.po: ARMGenRegisterInfo.inc.h
+ARMTargetObjectFile.po: ARMGenSubtargetInfo.inc.h
+MLxExpansionPass.o: ARMGenInstrInfo.inc.h
+MLxExpansionPass.o: ARMGenRegisterInfo.inc.h
+MLxExpansionPass.o: ARMGenSubtargetInfo.inc.h
+MLxExpansionPass.po: ARMGenInstrInfo.inc.h
+MLxExpansionPass.po: ARMGenRegisterInfo.inc.h
+MLxExpansionPass.po: ARMGenSubtargetInfo.inc.h
+Thumb1FrameLowering.o: ARMGenInstrInfo.inc.h
+Thumb1FrameLowering.o: ARMGenRegisterInfo.inc.h
+Thumb1FrameLowering.o: ARMGenSubtargetInfo.inc.h
+Thumb1FrameLowering.po: ARMGenInstrInfo.inc.h
+Thumb1FrameLowering.po: ARMGenRegisterInfo.inc.h
+Thumb1FrameLowering.po: ARMGenSubtargetInfo.inc.h
+Thumb1InstrInfo.o: ARMGenInstrInfo.inc.h
+Thumb1InstrInfo.o: ARMGenRegisterInfo.inc.h
+Thumb1InstrInfo.o: ARMGenSubtargetInfo.inc.h
+Thumb1InstrInfo.po: ARMGenInstrInfo.inc.h
+Thumb1InstrInfo.po: ARMGenRegisterInfo.inc.h
+Thumb1InstrInfo.po: ARMGenSubtargetInfo.inc.h
+Thumb1RegisterInfo.o: ARMGenInstrInfo.inc.h
+Thumb1RegisterInfo.o: ARMGenRegisterInfo.inc.h
+Thumb1RegisterInfo.o: ARMGenSubtargetInfo.inc.h
+Thumb1RegisterInfo.po: ARMGenInstrInfo.inc.h
+Thumb1RegisterInfo.po: ARMGenRegisterInfo.inc.h
+Thumb1RegisterInfo.po: ARMGenSubtargetInfo.inc.h
+Thumb2ITBlockPass.o: ARMGenInstrInfo.inc.h
+Thumb2ITBlockPass.o: ARMGenRegisterInfo.inc.h
+Thumb2ITBlockPass.o: ARMGenSubtargetInfo.inc.h
+Thumb2ITBlockPass.po: ARMGenInstrInfo.inc.h
+Thumb2ITBlockPass.po: ARMGenRegisterInfo.inc.h
+Thumb2ITBlockPass.po: ARMGenSubtargetInfo.inc.h
+Thumb2InstrInfo.o: ARMGenInstrInfo.inc.h
+Thumb2InstrInfo.o: ARMGenRegisterInfo.inc.h
+Thumb2InstrInfo.o: ARMGenSubtargetInfo.inc.h
+Thumb2InstrInfo.po: ARMGenInstrInfo.inc.h
+Thumb2InstrInfo.po: ARMGenRegisterInfo.inc.h
+Thumb2InstrInfo.po: ARMGenSubtargetInfo.inc.h
+Thumb2RegisterInfo.o: ARMGenInstrInfo.inc.h
+Thumb2RegisterInfo.o: ARMGenRegisterInfo.inc.h
+Thumb2RegisterInfo.o: ARMGenSubtargetInfo.inc.h
+Thumb2RegisterInfo.po: ARMGenInstrInfo.inc.h
+Thumb2RegisterInfo.po: ARMGenRegisterInfo.inc.h
+Thumb2RegisterInfo.po: ARMGenSubtargetInfo.inc.h
+Thumb2SizeReduction.o: ARMGenInstrInfo.inc.h
+Thumb2SizeReduction.o: ARMGenRegisterInfo.inc.h
+Thumb2SizeReduction.o: ARMGenSubtargetInfo.inc.h
+Thumb2SizeReduction.po: ARMGenInstrInfo.inc.h
+Thumb2SizeReduction.po: ARMGenRegisterInfo.inc.h
+Thumb2SizeReduction.po: ARMGenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmarmdesc/Makefile.depend b/lib/clang/libllvmarmdesc/Makefile.depend
new file mode 100644
index 0000000..1f4c165
--- /dev/null
+++ b/lib/clang/libllvmarmdesc/Makefile.depend
@@ -0,0 +1,49 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+ARMAsmBackend.o: ARMGenInstrInfo.inc.h
+ARMAsmBackend.o: ARMGenRegisterInfo.inc.h
+ARMAsmBackend.o: ARMGenSubtargetInfo.inc.h
+ARMAsmBackend.po: ARMGenInstrInfo.inc.h
+ARMAsmBackend.po: ARMGenRegisterInfo.inc.h
+ARMAsmBackend.po: ARMGenSubtargetInfo.inc.h
+ARMELFObjectWriter.o: ARMGenInstrInfo.inc.h
+ARMELFObjectWriter.o: ARMGenRegisterInfo.inc.h
+ARMELFObjectWriter.o: ARMGenSubtargetInfo.inc.h
+ARMELFObjectWriter.po: ARMGenInstrInfo.inc.h
+ARMELFObjectWriter.po: ARMGenRegisterInfo.inc.h
+ARMELFObjectWriter.po: ARMGenSubtargetInfo.inc.h
+ARMMCCodeEmitter.o: ARMGenInstrInfo.inc.h
+ARMMCCodeEmitter.o: ARMGenMCCodeEmitter.inc.h
+ARMMCCodeEmitter.o: ARMGenRegisterInfo.inc.h
+ARMMCCodeEmitter.o: ARMGenSubtargetInfo.inc.h
+ARMMCCodeEmitter.po: ARMGenInstrInfo.inc.h
+ARMMCCodeEmitter.po: ARMGenMCCodeEmitter.inc.h
+ARMMCCodeEmitter.po: ARMGenRegisterInfo.inc.h
+ARMMCCodeEmitter.po: ARMGenSubtargetInfo.inc.h
+ARMMCTargetDesc.o: ARMGenInstrInfo.inc.h
+ARMMCTargetDesc.o: ARMGenRegisterInfo.inc.h
+ARMMCTargetDesc.o: ARMGenSubtargetInfo.inc.h
+ARMMCTargetDesc.po: ARMGenInstrInfo.inc.h
+ARMMCTargetDesc.po: ARMGenRegisterInfo.inc.h
+ARMMCTargetDesc.po: ARMGenSubtargetInfo.inc.h
+ARMMachObjectWriter.o: ARMGenInstrInfo.inc.h
+ARMMachObjectWriter.o: ARMGenRegisterInfo.inc.h
+ARMMachObjectWriter.o: ARMGenSubtargetInfo.inc.h
+ARMMachObjectWriter.po: ARMGenInstrInfo.inc.h
+ARMMachObjectWriter.po: ARMGenRegisterInfo.inc.h
+ARMMachObjectWriter.po: ARMGenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmarmdisassembler/Makefile.depend b/lib/clang/libllvmarmdisassembler/Makefile.depend
new file mode 100644
index 0000000..0e79928
--- /dev/null
+++ b/lib/clang/libllvmarmdisassembler/Makefile.depend
@@ -0,0 +1,27 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+ARMDisassembler.o: ARMGenDisassemblerTables.inc.h
+ARMDisassembler.o: ARMGenEDInfo.inc.h
+ARMDisassembler.o: ARMGenInstrInfo.inc.h
+ARMDisassembler.o: ARMGenRegisterInfo.inc.h
+ARMDisassembler.o: ARMGenSubtargetInfo.inc.h
+ARMDisassembler.po: ARMGenDisassemblerTables.inc.h
+ARMDisassembler.po: ARMGenEDInfo.inc.h
+ARMDisassembler.po: ARMGenInstrInfo.inc.h
+ARMDisassembler.po: ARMGenRegisterInfo.inc.h
+ARMDisassembler.po: ARMGenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmarminfo/Makefile.depend b/lib/clang/libllvmarminfo/Makefile.depend
new file mode 100644
index 0000000..06b4fd9
--- /dev/null
+++ b/lib/clang/libllvmarminfo/Makefile.depend
@@ -0,0 +1,23 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+ARMTargetInfo.o: ARMGenInstrInfo.inc.h
+ARMTargetInfo.o: ARMGenRegisterInfo.inc.h
+ARMTargetInfo.o: ARMGenSubtargetInfo.inc.h
+ARMTargetInfo.po: ARMGenInstrInfo.inc.h
+ARMTargetInfo.po: ARMGenRegisterInfo.inc.h
+ARMTargetInfo.po: ARMGenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmarminstprinter/Makefile.depend b/lib/clang/libllvmarminstprinter/Makefile.depend
new file mode 100644
index 0000000..9bcf0c7
--- /dev/null
+++ b/lib/clang/libllvmarminstprinter/Makefile.depend
@@ -0,0 +1,25 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+ARMInstPrinter.o: ARMGenAsmWriter.inc.h
+ARMInstPrinter.o: ARMGenInstrInfo.inc.h
+ARMInstPrinter.o: ARMGenRegisterInfo.inc.h
+ARMInstPrinter.o: ARMGenSubtargetInfo.inc.h
+ARMInstPrinter.po: ARMGenAsmWriter.inc.h
+ARMInstPrinter.po: ARMGenInstrInfo.inc.h
+ARMInstPrinter.po: ARMGenRegisterInfo.inc.h
+ARMInstPrinter.po: ARMGenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmasmparser/Makefile.depend b/lib/clang/libllvmasmparser/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmasmparser/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmasmprinter/Makefile.depend b/lib/clang/libllvmasmprinter/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmasmprinter/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmbitreader/Makefile.depend b/lib/clang/libllvmbitreader/Makefile.depend
new file mode 100644
index 0000000..97f57a5
--- /dev/null
+++ b/lib/clang/libllvmbitreader/Makefile.depend
@@ -0,0 +1,19 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+BitcodeReader.o: Intrinsics.inc.h
+BitcodeReader.po: Intrinsics.inc.h
+.endif
diff --git a/lib/clang/libllvmbitwriter/Makefile.depend b/lib/clang/libllvmbitwriter/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmbitwriter/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmcodegen/Makefile b/lib/clang/libllvmcodegen/Makefile
index 70da7da..a0db98f 100644
--- a/lib/clang/libllvmcodegen/Makefile
+++ b/lib/clang/libllvmcodegen/Makefile
@@ -15,6 +15,7 @@ SRCS= AggressiveAntiDepBreaker.cpp \
DeadMachineInstructionElim.cpp \
DFAPacketizer.cpp \
DwarfEHPrepare.cpp \
+ EarlyIfConversion.cpp \
EdgeBundles.cpp \
ExecutionDepsFix.cpp \
ExpandISelPseudos.cpp \
@@ -34,6 +35,7 @@ SRCS= AggressiveAntiDepBreaker.cpp \
LiveInterval.cpp \
LiveIntervalAnalysis.cpp \
LiveIntervalUnion.cpp \
+ LiveRegMatrix.cpp \
LiveStackAnalysis.cpp \
LiveVariables.cpp \
LiveRangeCalc.cpp \
@@ -63,6 +65,7 @@ SRCS= AggressiveAntiDepBreaker.cpp \
MachineSSAUpdater.cpp \
MachineScheduler.cpp \
MachineSink.cpp \
+ MachineTraceMetrics.cpp \
MachineVerifier.cpp \
OcamlGC.cpp \
OptimizePHIs.cpp \
@@ -81,8 +84,8 @@ SRCS= AggressiveAntiDepBreaker.cpp \
RegAllocPBQP.cpp \
RegisterClassInfo.cpp \
RegisterCoalescer.cpp \
+ RegisterPressure.cpp \
RegisterScavenging.cpp \
- RenderMachineFunction.cpp \
ScheduleDAG.cpp \
ScheduleDAGInstrs.cpp \
ScheduleDAGPrinter.cpp \
diff --git a/lib/clang/libllvmcodegen/Makefile.depend b/lib/clang/libllvmcodegen/Makefile.depend
new file mode 100644
index 0000000..026d1de
--- /dev/null
+++ b/lib/clang/libllvmcodegen/Makefile.depend
@@ -0,0 +1,33 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+Analysis.o: Intrinsics.inc.h
+Analysis.po: Intrinsics.inc.h
+DwarfEHPrepare.o: Intrinsics.inc.h
+DwarfEHPrepare.po: Intrinsics.inc.h
+GCStrategy.o: Intrinsics.inc.h
+GCStrategy.po: Intrinsics.inc.h
+IntrinsicLowering.o: Intrinsics.inc.h
+IntrinsicLowering.po: Intrinsics.inc.h
+LocalStackSlotAllocation.o: Intrinsics.inc.h
+LocalStackSlotAllocation.po: Intrinsics.inc.h
+ShadowStackGC.o: Intrinsics.inc.h
+ShadowStackGC.po: Intrinsics.inc.h
+SjLjEHPrepare.o: Intrinsics.inc.h
+SjLjEHPrepare.po: Intrinsics.inc.h
+StackProtector.o: Intrinsics.inc.h
+StackProtector.po: Intrinsics.inc.h
+.endif
diff --git a/lib/clang/libllvmcore/Makefile b/lib/clang/libllvmcore/Makefile
index 2702b66..8de6731 100644
--- a/lib/clang/libllvmcore/Makefile
+++ b/lib/clang/libllvmcore/Makefile
@@ -10,6 +10,8 @@ SRCS= AsmWriter.cpp \
ConstantFold.cpp \
Constants.cpp \
Core.cpp \
+ DIBuilder.cpp \
+ DebugInfo.cpp \
DebugLoc.cpp \
Dominators.cpp \
Function.cpp \
@@ -30,6 +32,7 @@ SRCS= AsmWriter.cpp \
PassRegistry.cpp \
PrintModulePass.cpp \
Type.cpp \
+ TypeFinder.cpp \
Use.cpp \
User.cpp \
Value.cpp \
diff --git a/lib/clang/libllvmcore/Makefile.depend b/lib/clang/libllvmcore/Makefile.depend
new file mode 100644
index 0000000..cdb4373
--- /dev/null
+++ b/lib/clang/libllvmcore/Makefile.depend
@@ -0,0 +1,33 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+AsmWriter.o: Intrinsics.inc.h
+AsmWriter.po: Intrinsics.inc.h
+AutoUpgrade.o: Intrinsics.inc.h
+AutoUpgrade.po: Intrinsics.inc.h
+BasicBlock.o: Intrinsics.inc.h
+BasicBlock.po: Intrinsics.inc.h
+Core.o: Intrinsics.inc.h
+Core.po: Intrinsics.inc.h
+Function.o: Intrinsics.inc.h
+Function.po: Intrinsics.inc.h
+IRBuilder.o: Intrinsics.inc.h
+IRBuilder.po: Intrinsics.inc.h
+IntrinsicInst.o: Intrinsics.inc.h
+IntrinsicInst.po: Intrinsics.inc.h
+Verifier.o: Intrinsics.inc.h
+Verifier.po: Intrinsics.inc.h
+.endif
diff --git a/lib/clang/libllvmdebuginfo/Makefile.depend b/lib/clang/libllvmdebuginfo/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmdebuginfo/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmexecutionengine/Makefile.depend b/lib/clang/libllvmexecutionengine/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmexecutionengine/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvminstcombine/Makefile.depend b/lib/clang/libllvminstcombine/Makefile.depend
new file mode 100644
index 0000000..27d7724
--- /dev/null
+++ b/lib/clang/libllvminstcombine/Makefile.depend
@@ -0,0 +1,43 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+InstCombineAddSub.o: Intrinsics.inc.h
+InstCombineAddSub.po: Intrinsics.inc.h
+InstCombineAndOrXor.o: Intrinsics.inc.h
+InstCombineAndOrXor.po: Intrinsics.inc.h
+InstCombineCalls.o: Intrinsics.inc.h
+InstCombineCalls.po: Intrinsics.inc.h
+InstCombineCasts.o: Intrinsics.inc.h
+InstCombineCasts.po: Intrinsics.inc.h
+InstCombineCompares.o: Intrinsics.inc.h
+InstCombineCompares.po: Intrinsics.inc.h
+InstCombineLoadStoreAlloca.o: Intrinsics.inc.h
+InstCombineLoadStoreAlloca.po: Intrinsics.inc.h
+InstCombineMulDivRem.o: Intrinsics.inc.h
+InstCombineMulDivRem.po: Intrinsics.inc.h
+InstCombinePHI.o: Intrinsics.inc.h
+InstCombinePHI.po: Intrinsics.inc.h
+InstCombineSelect.o: Intrinsics.inc.h
+InstCombineSelect.po: Intrinsics.inc.h
+InstCombineShifts.o: Intrinsics.inc.h
+InstCombineShifts.po: Intrinsics.inc.h
+InstCombineSimplifyDemanded.o: Intrinsics.inc.h
+InstCombineSimplifyDemanded.po: Intrinsics.inc.h
+InstCombineVectorOps.o: Intrinsics.inc.h
+InstCombineVectorOps.po: Intrinsics.inc.h
+InstructionCombining.o: Intrinsics.inc.h
+InstructionCombining.po: Intrinsics.inc.h
+.endif
diff --git a/lib/clang/libllvminstrumentation/Makefile b/lib/clang/libllvminstrumentation/Makefile
index fbfa198..8e7e7a2 100644
--- a/lib/clang/libllvminstrumentation/Makefile
+++ b/lib/clang/libllvminstrumentation/Makefile
@@ -4,6 +4,7 @@ LIB= llvminstrumentation
SRCDIR= lib/Transforms/Instrumentation
SRCS= AddressSanitizer.cpp \
+ BoundsChecking.cpp \
EdgeProfiling.cpp \
FunctionBlackList.cpp \
GCOVProfiling.cpp \
diff --git a/lib/clang/libllvminstrumentation/Makefile.depend b/lib/clang/libllvminstrumentation/Makefile.depend
new file mode 100644
index 0000000..2574cd5
--- /dev/null
+++ b/lib/clang/libllvminstrumentation/Makefile.depend
@@ -0,0 +1,21 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+AddressSanitizer.o: Intrinsics.inc.h
+AddressSanitizer.po: Intrinsics.inc.h
+ThreadSanitizer.o: Intrinsics.inc.h
+ThreadSanitizer.po: Intrinsics.inc.h
+.endif
diff --git a/lib/clang/libllvminterpreter/Makefile.depend b/lib/clang/libllvminterpreter/Makefile.depend
new file mode 100644
index 0000000..0c45153
--- /dev/null
+++ b/lib/clang/libllvminterpreter/Makefile.depend
@@ -0,0 +1,21 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+Execution.o: Intrinsics.inc.h
+Execution.po: Intrinsics.inc.h
+Interpreter.o: Intrinsics.inc.h
+Interpreter.po: Intrinsics.inc.h
+.endif
diff --git a/lib/clang/libllvmipa/Makefile.depend b/lib/clang/libllvmipa/Makefile.depend
new file mode 100644
index 0000000..9b4317f
--- /dev/null
+++ b/lib/clang/libllvmipa/Makefile.depend
@@ -0,0 +1,23 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+CallGraph.o: Intrinsics.inc.h
+CallGraph.po: Intrinsics.inc.h
+CallGraphSCCPass.o: Intrinsics.inc.h
+CallGraphSCCPass.po: Intrinsics.inc.h
+GlobalsModRef.o: Intrinsics.inc.h
+GlobalsModRef.po: Intrinsics.inc.h
+.endif
diff --git a/lib/clang/libllvmipo/Makefile.depend b/lib/clang/libllvmipo/Makefile.depend
new file mode 100644
index 0000000..6f90d4d
--- /dev/null
+++ b/lib/clang/libllvmipo/Makefile.depend
@@ -0,0 +1,31 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+DeadArgumentElimination.o: Intrinsics.inc.h
+DeadArgumentElimination.po: Intrinsics.inc.h
+FunctionAttrs.o: Intrinsics.inc.h
+FunctionAttrs.po: Intrinsics.inc.h
+GlobalOpt.o: Intrinsics.inc.h
+GlobalOpt.po: Intrinsics.inc.h
+InlineAlways.o: Intrinsics.inc.h
+InlineAlways.po: Intrinsics.inc.h
+InlineSimple.o: Intrinsics.inc.h
+InlineSimple.po: Intrinsics.inc.h
+Inliner.o: Intrinsics.inc.h
+Inliner.po: Intrinsics.inc.h
+PruneEH.o: Intrinsics.inc.h
+PruneEH.po: Intrinsics.inc.h
+.endif
diff --git a/lib/clang/libllvmjit/Makefile.depend b/lib/clang/libllvmjit/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmjit/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmlinker/Makefile.depend b/lib/clang/libllvmlinker/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmlinker/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmmc/Makefile b/lib/clang/libllvmmc/Makefile
index 9309e97..61b8c37 100644
--- a/lib/clang/libllvmmc/Makefile
+++ b/lib/clang/libllvmmc/Makefile
@@ -12,8 +12,9 @@ SRCS= ELFObjectWriter.cpp \
MCAsmInfoDarwin.cpp \
MCAsmStreamer.cpp \
MCAssembler.cpp \
- MCCodeGenInfo.cpp \
+ MCAtom.cpp \
MCCodeEmitter.cpp \
+ MCCodeGenInfo.cpp \
MCContext.cpp \
MCDwarf.cpp \
MCELF.cpp \
@@ -23,13 +24,16 @@ SRCS= ELFObjectWriter.cpp \
MCInst.cpp \
MCInstPrinter.cpp \
MCInstrAnalysis.cpp \
+ MCLabel.cpp \
MCMachOStreamer.cpp \
MCMachObjectTargetWriter.cpp \
+ MCModule.cpp \
MCNullStreamer.cpp \
MCObjectFileInfo.cpp \
MCObjectStreamer.cpp \
MCObjectWriter.cpp \
MCPureStreamer.cpp \
+ MCRegisterInfo.cpp \
MCSection.cpp \
MCSectionCOFF.cpp \
MCSectionELF.cpp \
@@ -38,6 +42,7 @@ SRCS= ELFObjectWriter.cpp \
MCSubtargetInfo.cpp \
MCSymbol.cpp \
MCTargetAsmLexer.cpp \
+ MCValue.cpp \
MCWin64EH.cpp \
MachObjectWriter.cpp \
SubtargetFeature.cpp \
diff --git a/lib/clang/libllvmmc/Makefile.depend b/lib/clang/libllvmmc/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmmc/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmmcdisassembler/Makefile.depend b/lib/clang/libllvmmcdisassembler/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmmcdisassembler/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmmcjit/Makefile.depend b/lib/clang/libllvmmcjit/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmmcjit/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmmcparser/Makefile.depend b/lib/clang/libllvmmcparser/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmmcparser/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmmipsasmparser/Makefile.depend b/lib/clang/libllvmmipsasmparser/Makefile.depend
new file mode 100644
index 0000000..a215c2c
--- /dev/null
+++ b/lib/clang/libllvmmipsasmparser/Makefile.depend
@@ -0,0 +1,23 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+MipsAsmParser.o: MipsGenInstrInfo.inc.h
+MipsAsmParser.o: MipsGenRegisterInfo.inc.h
+MipsAsmParser.o: MipsGenSubtargetInfo.inc.h
+MipsAsmParser.po: MipsGenInstrInfo.inc.h
+MipsAsmParser.po: MipsGenRegisterInfo.inc.h
+MipsAsmParser.po: MipsGenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmmipscodegen/Makefile b/lib/clang/libllvmmipscodegen/Makefile
index d550006..ae7d2f6 100644
--- a/lib/clang/libllvmmipscodegen/Makefile
+++ b/lib/clang/libllvmmipscodegen/Makefile
@@ -3,20 +3,25 @@
LIB= llvmmipscodegen
SRCDIR= lib/Target/Mips
-SRCS= MipsAnalyzeImmediate.cpp \
+SRCS= Mips16FrameLowering.cpp \
+ Mips16InstrInfo.cpp \
+ Mips16RegisterInfo.cpp \
+ MipsAnalyzeImmediate.cpp \
MipsAsmPrinter.cpp \
MipsCodeEmitter.cpp \
MipsDelaySlotFiller.cpp \
- MipsEmitGPRestore.cpp \
- MipsExpandPseudo.cpp \
MipsFrameLowering.cpp \
MipsISelDAGToDAG.cpp \
MipsISelLowering.cpp \
MipsInstrInfo.cpp \
MipsJITInfo.cpp \
+ MipsLongBranch.cpp \
MipsMCInstLower.cpp \
MipsMachineFunction.cpp \
MipsRegisterInfo.cpp \
+ MipsSEFrameLowering.cpp \
+ MipsSEInstrInfo.cpp \
+ MipsSERegisterInfo.cpp \
MipsSelectionDAGInfo.cpp \
MipsSubtarget.cpp \
MipsTargetMachine.cpp \
diff --git a/lib/clang/libllvmmipscodegen/Makefile.depend b/lib/clang/libllvmmipscodegen/Makefile.depend
new file mode 100644
index 0000000..28ee994
--- /dev/null
+++ b/lib/clang/libllvmmipscodegen/Makefile.depend
@@ -0,0 +1,131 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+MipsAnalyzeImmediate.o: MipsGenInstrInfo.inc.h
+MipsAnalyzeImmediate.o: MipsGenRegisterInfo.inc.h
+MipsAnalyzeImmediate.o: MipsGenSubtargetInfo.inc.h
+MipsAnalyzeImmediate.po: MipsGenInstrInfo.inc.h
+MipsAnalyzeImmediate.po: MipsGenRegisterInfo.inc.h
+MipsAnalyzeImmediate.po: MipsGenSubtargetInfo.inc.h
+MipsAsmPrinter.o: MipsGenInstrInfo.inc.h
+MipsAsmPrinter.o: MipsGenRegisterInfo.inc.h
+MipsAsmPrinter.o: MipsGenSubtargetInfo.inc.h
+MipsAsmPrinter.po: MipsGenInstrInfo.inc.h
+MipsAsmPrinter.po: MipsGenRegisterInfo.inc.h
+MipsAsmPrinter.po: MipsGenSubtargetInfo.inc.h
+MipsCodeEmitter.o: MipsGenCodeEmitter.inc.h
+MipsCodeEmitter.o: MipsGenInstrInfo.inc.h
+MipsCodeEmitter.o: MipsGenRegisterInfo.inc.h
+MipsCodeEmitter.o: MipsGenSubtargetInfo.inc.h
+MipsCodeEmitter.po: MipsGenCodeEmitter.inc.h
+MipsCodeEmitter.po: MipsGenInstrInfo.inc.h
+MipsCodeEmitter.po: MipsGenRegisterInfo.inc.h
+MipsCodeEmitter.po: MipsGenSubtargetInfo.inc.h
+MipsDelaySlotFiller.o: MipsGenInstrInfo.inc.h
+MipsDelaySlotFiller.o: MipsGenRegisterInfo.inc.h
+MipsDelaySlotFiller.o: MipsGenSubtargetInfo.inc.h
+MipsDelaySlotFiller.po: MipsGenInstrInfo.inc.h
+MipsDelaySlotFiller.po: MipsGenRegisterInfo.inc.h
+MipsDelaySlotFiller.po: MipsGenSubtargetInfo.inc.h
+MipsEmitGPRestore.o: MipsGenInstrInfo.inc.h
+MipsEmitGPRestore.o: MipsGenRegisterInfo.inc.h
+MipsEmitGPRestore.o: MipsGenSubtargetInfo.inc.h
+MipsEmitGPRestore.po: MipsGenInstrInfo.inc.h
+MipsEmitGPRestore.po: MipsGenRegisterInfo.inc.h
+MipsEmitGPRestore.po: MipsGenSubtargetInfo.inc.h
+MipsExpandPseudo.o: MipsGenInstrInfo.inc.h
+MipsExpandPseudo.o: MipsGenRegisterInfo.inc.h
+MipsExpandPseudo.o: MipsGenSubtargetInfo.inc.h
+MipsExpandPseudo.po: MipsGenInstrInfo.inc.h
+MipsExpandPseudo.po: MipsGenRegisterInfo.inc.h
+MipsExpandPseudo.po: MipsGenSubtargetInfo.inc.h
+MipsFrameLowering.o: MipsGenInstrInfo.inc.h
+MipsFrameLowering.o: MipsGenRegisterInfo.inc.h
+MipsFrameLowering.o: MipsGenSubtargetInfo.inc.h
+MipsFrameLowering.po: MipsGenInstrInfo.inc.h
+MipsFrameLowering.po: MipsGenRegisterInfo.inc.h
+MipsFrameLowering.po: MipsGenSubtargetInfo.inc.h
+MipsISelDAGToDAG.o: Intrinsics.inc.h
+MipsISelDAGToDAG.o: MipsGenDAGISel.inc.h
+MipsISelDAGToDAG.o: MipsGenInstrInfo.inc.h
+MipsISelDAGToDAG.o: MipsGenRegisterInfo.inc.h
+MipsISelDAGToDAG.o: MipsGenSubtargetInfo.inc.h
+MipsISelDAGToDAG.po: Intrinsics.inc.h
+MipsISelDAGToDAG.po: MipsGenDAGISel.inc.h
+MipsISelDAGToDAG.po: MipsGenInstrInfo.inc.h
+MipsISelDAGToDAG.po: MipsGenRegisterInfo.inc.h
+MipsISelDAGToDAG.po: MipsGenSubtargetInfo.inc.h
+MipsISelLowering.o: Intrinsics.inc.h
+MipsISelLowering.o: MipsGenCallingConv.inc.h
+MipsISelLowering.o: MipsGenInstrInfo.inc.h
+MipsISelLowering.o: MipsGenRegisterInfo.inc.h
+MipsISelLowering.o: MipsGenSubtargetInfo.inc.h
+MipsISelLowering.po: Intrinsics.inc.h
+MipsISelLowering.po: MipsGenCallingConv.inc.h
+MipsISelLowering.po: MipsGenInstrInfo.inc.h
+MipsISelLowering.po: MipsGenRegisterInfo.inc.h
+MipsISelLowering.po: MipsGenSubtargetInfo.inc.h
+MipsInstrInfo.o: MipsGenInstrInfo.inc.h
+MipsInstrInfo.o: MipsGenRegisterInfo.inc.h
+MipsInstrInfo.o: MipsGenSubtargetInfo.inc.h
+MipsInstrInfo.po: MipsGenInstrInfo.inc.h
+MipsInstrInfo.po: MipsGenRegisterInfo.inc.h
+MipsInstrInfo.po: MipsGenSubtargetInfo.inc.h
+MipsJITInfo.o: MipsGenInstrInfo.inc.h
+MipsJITInfo.o: MipsGenRegisterInfo.inc.h
+MipsJITInfo.o: MipsGenSubtargetInfo.inc.h
+MipsJITInfo.po: MipsGenInstrInfo.inc.h
+MipsJITInfo.po: MipsGenRegisterInfo.inc.h
+MipsJITInfo.po: MipsGenSubtargetInfo.inc.h
+MipsMCInstLower.o: MipsGenInstrInfo.inc.h
+MipsMCInstLower.o: MipsGenRegisterInfo.inc.h
+MipsMCInstLower.o: MipsGenSubtargetInfo.inc.h
+MipsMCInstLower.po: MipsGenInstrInfo.inc.h
+MipsMCInstLower.po: MipsGenRegisterInfo.inc.h
+MipsMCInstLower.po: MipsGenSubtargetInfo.inc.h
+MipsMachineFunction.o: MipsGenInstrInfo.inc.h
+MipsMachineFunction.o: MipsGenRegisterInfo.inc.h
+MipsMachineFunction.o: MipsGenSubtargetInfo.inc.h
+MipsMachineFunction.po: MipsGenInstrInfo.inc.h
+MipsMachineFunction.po: MipsGenRegisterInfo.inc.h
+MipsMachineFunction.po: MipsGenSubtargetInfo.inc.h
+MipsRegisterInfo.o: MipsGenInstrInfo.inc.h
+MipsRegisterInfo.o: MipsGenRegisterInfo.inc.h
+MipsRegisterInfo.o: MipsGenSubtargetInfo.inc.h
+MipsRegisterInfo.po: MipsGenInstrInfo.inc.h
+MipsRegisterInfo.po: MipsGenRegisterInfo.inc.h
+MipsRegisterInfo.po: MipsGenSubtargetInfo.inc.h
+MipsSelectionDAGInfo.o: MipsGenInstrInfo.inc.h
+MipsSelectionDAGInfo.o: MipsGenRegisterInfo.inc.h
+MipsSelectionDAGInfo.o: MipsGenSubtargetInfo.inc.h
+MipsSelectionDAGInfo.po: MipsGenInstrInfo.inc.h
+MipsSelectionDAGInfo.po: MipsGenRegisterInfo.inc.h
+MipsSelectionDAGInfo.po: MipsGenSubtargetInfo.inc.h
+MipsSubtarget.o: MipsGenInstrInfo.inc.h
+MipsSubtarget.o: MipsGenRegisterInfo.inc.h
+MipsSubtarget.o: MipsGenSubtargetInfo.inc.h
+MipsSubtarget.po: MipsGenInstrInfo.inc.h
+MipsSubtarget.po: MipsGenRegisterInfo.inc.h
+MipsSubtarget.po: MipsGenSubtargetInfo.inc.h
+MipsTargetMachine.o: MipsGenInstrInfo.inc.h
+MipsTargetMachine.o: MipsGenRegisterInfo.inc.h
+MipsTargetMachine.o: MipsGenSubtargetInfo.inc.h
+MipsTargetMachine.po: MipsGenInstrInfo.inc.h
+MipsTargetMachine.po: MipsGenRegisterInfo.inc.h
+MipsTargetMachine.po: MipsGenSubtargetInfo.inc.h
+MipsTargetObjectFile.o: MipsGenSubtargetInfo.inc.h
+MipsTargetObjectFile.po: MipsGenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmmipsdesc/Makefile.depend b/lib/clang/libllvmmipsdesc/Makefile.depend
new file mode 100644
index 0000000..1aceb5f
--- /dev/null
+++ b/lib/clang/libllvmmipsdesc/Makefile.depend
@@ -0,0 +1,43 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+MipsAsmBackend.o: MipsGenInstrInfo.inc.h
+MipsAsmBackend.o: MipsGenRegisterInfo.inc.h
+MipsAsmBackend.o: MipsGenSubtargetInfo.inc.h
+MipsAsmBackend.po: MipsGenInstrInfo.inc.h
+MipsAsmBackend.po: MipsGenRegisterInfo.inc.h
+MipsAsmBackend.po: MipsGenSubtargetInfo.inc.h
+MipsELFObjectWriter.o: MipsGenInstrInfo.inc.h
+MipsELFObjectWriter.o: MipsGenRegisterInfo.inc.h
+MipsELFObjectWriter.o: MipsGenSubtargetInfo.inc.h
+MipsELFObjectWriter.po: MipsGenInstrInfo.inc.h
+MipsELFObjectWriter.po: MipsGenRegisterInfo.inc.h
+MipsELFObjectWriter.po: MipsGenSubtargetInfo.inc.h
+MipsMCCodeEmitter.o: MipsGenInstrInfo.inc.h
+MipsMCCodeEmitter.o: MipsGenMCCodeEmitter.inc.h
+MipsMCCodeEmitter.o: MipsGenRegisterInfo.inc.h
+MipsMCCodeEmitter.o: MipsGenSubtargetInfo.inc.h
+MipsMCCodeEmitter.po: MipsGenInstrInfo.inc.h
+MipsMCCodeEmitter.po: MipsGenMCCodeEmitter.inc.h
+MipsMCCodeEmitter.po: MipsGenRegisterInfo.inc.h
+MipsMCCodeEmitter.po: MipsGenSubtargetInfo.inc.h
+MipsMCTargetDesc.o: MipsGenInstrInfo.inc.h
+MipsMCTargetDesc.o: MipsGenRegisterInfo.inc.h
+MipsMCTargetDesc.o: MipsGenSubtargetInfo.inc.h
+MipsMCTargetDesc.po: MipsGenInstrInfo.inc.h
+MipsMCTargetDesc.po: MipsGenRegisterInfo.inc.h
+MipsMCTargetDesc.po: MipsGenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmmipsdisassembler/Makefile b/lib/clang/libllvmmipsdisassembler/Makefile
new file mode 100644
index 0000000..7cdd982
--- /dev/null
+++ b/lib/clang/libllvmmipsdisassembler/Makefile
@@ -0,0 +1,15 @@
+# $FreeBSD$
+
+LIB= llvmmipsdisassembler
+
+SRCDIR= lib/Target/Mips/Disassembler
+INCDIR= lib/Target/Mips
+SRCS= MipsDisassembler.cpp
+
+TGHDRS= MipsGenDisassemblerTables \
+ MipsGenEDInfo \
+ MipsGenInstrInfo \
+ MipsGenRegisterInfo \
+ MipsGenSubtargetInfo
+
+.include "../clang.lib.mk"
diff --git a/lib/clang/libllvmmipsinfo/Makefile.depend b/lib/clang/libllvmmipsinfo/Makefile.depend
new file mode 100644
index 0000000..54441b5
--- /dev/null
+++ b/lib/clang/libllvmmipsinfo/Makefile.depend
@@ -0,0 +1,23 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+MipsTargetInfo.o: MipsGenInstrInfo.inc.h
+MipsTargetInfo.o: MipsGenRegisterInfo.inc.h
+MipsTargetInfo.o: MipsGenSubtargetInfo.inc.h
+MipsTargetInfo.po: MipsGenInstrInfo.inc.h
+MipsTargetInfo.po: MipsGenRegisterInfo.inc.h
+MipsTargetInfo.po: MipsGenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmmipsinstprinter/Makefile b/lib/clang/libllvmmipsinstprinter/Makefile
index 357320e..36d3b04 100644
--- a/lib/clang/libllvmmipsinstprinter/Makefile
+++ b/lib/clang/libllvmmipsinstprinter/Makefile
@@ -8,6 +8,7 @@ SRCS= MipsInstPrinter.cpp
TGHDRS= MipsGenAsmWriter \
MipsGenInstrInfo \
- MipsGenRegisterInfo
+ MipsGenRegisterInfo \
+ MipsGenSubtargetInfo
.include "../clang.lib.mk"
diff --git a/lib/clang/libllvmmipsinstprinter/Makefile.depend b/lib/clang/libllvmmipsinstprinter/Makefile.depend
new file mode 100644
index 0000000..5ecd0b5
--- /dev/null
+++ b/lib/clang/libllvmmipsinstprinter/Makefile.depend
@@ -0,0 +1,19 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+MipsInstPrinter.o: MipsGenAsmWriter.inc.h
+MipsInstPrinter.po: MipsGenAsmWriter.inc.h
+.endif
diff --git a/lib/clang/libllvmobject/Makefile.depend b/lib/clang/libllvmobject/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmobject/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmpowerpccodegen/Makefile b/lib/clang/libllvmpowerpccodegen/Makefile
index 1874095..a97c352 100644
--- a/lib/clang/libllvmpowerpccodegen/Makefile
+++ b/lib/clang/libllvmpowerpccodegen/Makefile
@@ -5,6 +5,7 @@ LIB= llvmpowerpccodegen
SRCDIR= lib/Target/PowerPC
SRCS= PPCAsmPrinter.cpp \
PPCBranchSelector.cpp \
+ PPCCTRLoops.cpp \
PPCCodeEmitter.cpp \
PPCFrameLowering.cpp \
PPCHazardRecognizers.cpp \
diff --git a/lib/clang/libllvmpowerpccodegen/Makefile.depend b/lib/clang/libllvmpowerpccodegen/Makefile.depend
new file mode 100644
index 0000000..988435f
--- /dev/null
+++ b/lib/clang/libllvmpowerpccodegen/Makefile.depend
@@ -0,0 +1,111 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+PPCAsmPrinter.o: PPCGenInstrInfo.inc.h
+PPCAsmPrinter.o: PPCGenRegisterInfo.inc.h
+PPCAsmPrinter.o: PPCGenSubtargetInfo.inc.h
+PPCAsmPrinter.po: PPCGenInstrInfo.inc.h
+PPCAsmPrinter.po: PPCGenRegisterInfo.inc.h
+PPCAsmPrinter.po: PPCGenSubtargetInfo.inc.h
+PPCBranchSelector.o: PPCGenInstrInfo.inc.h
+PPCBranchSelector.o: PPCGenRegisterInfo.inc.h
+PPCBranchSelector.o: PPCGenSubtargetInfo.inc.h
+PPCBranchSelector.po: PPCGenInstrInfo.inc.h
+PPCBranchSelector.po: PPCGenRegisterInfo.inc.h
+PPCBranchSelector.po: PPCGenSubtargetInfo.inc.h
+PPCCodeEmitter.o: PPCGenCodeEmitter.inc.h
+PPCCodeEmitter.o: PPCGenInstrInfo.inc.h
+PPCCodeEmitter.o: PPCGenRegisterInfo.inc.h
+PPCCodeEmitter.o: PPCGenSubtargetInfo.inc.h
+PPCCodeEmitter.po: PPCGenCodeEmitter.inc.h
+PPCCodeEmitter.po: PPCGenInstrInfo.inc.h
+PPCCodeEmitter.po: PPCGenRegisterInfo.inc.h
+PPCCodeEmitter.po: PPCGenSubtargetInfo.inc.h
+PPCFrameLowering.o: PPCGenInstrInfo.inc.h
+PPCFrameLowering.o: PPCGenRegisterInfo.inc.h
+PPCFrameLowering.o: PPCGenSubtargetInfo.inc.h
+PPCFrameLowering.po: PPCGenInstrInfo.inc.h
+PPCFrameLowering.po: PPCGenRegisterInfo.inc.h
+PPCFrameLowering.po: PPCGenSubtargetInfo.inc.h
+PPCHazardRecognizers.o: PPCGenInstrInfo.inc.h
+PPCHazardRecognizers.o: PPCGenRegisterInfo.inc.h
+PPCHazardRecognizers.o: PPCGenSubtargetInfo.inc.h
+PPCHazardRecognizers.po: PPCGenInstrInfo.inc.h
+PPCHazardRecognizers.po: PPCGenRegisterInfo.inc.h
+PPCHazardRecognizers.po: PPCGenSubtargetInfo.inc.h
+PPCISelDAGToDAG.o: Intrinsics.inc.h
+PPCISelDAGToDAG.o: PPCGenDAGISel.inc.h
+PPCISelDAGToDAG.o: PPCGenInstrInfo.inc.h
+PPCISelDAGToDAG.o: PPCGenRegisterInfo.inc.h
+PPCISelDAGToDAG.o: PPCGenSubtargetInfo.inc.h
+PPCISelDAGToDAG.po: Intrinsics.inc.h
+PPCISelDAGToDAG.po: PPCGenDAGISel.inc.h
+PPCISelDAGToDAG.po: PPCGenInstrInfo.inc.h
+PPCISelDAGToDAG.po: PPCGenRegisterInfo.inc.h
+PPCISelDAGToDAG.po: PPCGenSubtargetInfo.inc.h
+PPCISelLowering.o: Intrinsics.inc.h
+PPCISelLowering.o: PPCGenCallingConv.inc.h
+PPCISelLowering.o: PPCGenInstrInfo.inc.h
+PPCISelLowering.o: PPCGenRegisterInfo.inc.h
+PPCISelLowering.o: PPCGenSubtargetInfo.inc.h
+PPCISelLowering.po: Intrinsics.inc.h
+PPCISelLowering.po: PPCGenCallingConv.inc.h
+PPCISelLowering.po: PPCGenInstrInfo.inc.h
+PPCISelLowering.po: PPCGenRegisterInfo.inc.h
+PPCISelLowering.po: PPCGenSubtargetInfo.inc.h
+PPCInstrInfo.o: PPCGenInstrInfo.inc.h
+PPCInstrInfo.o: PPCGenRegisterInfo.inc.h
+PPCInstrInfo.o: PPCGenSubtargetInfo.inc.h
+PPCInstrInfo.po: PPCGenInstrInfo.inc.h
+PPCInstrInfo.po: PPCGenRegisterInfo.inc.h
+PPCInstrInfo.po: PPCGenSubtargetInfo.inc.h
+PPCJITInfo.o: PPCGenInstrInfo.inc.h
+PPCJITInfo.o: PPCGenRegisterInfo.inc.h
+PPCJITInfo.o: PPCGenSubtargetInfo.inc.h
+PPCJITInfo.po: PPCGenInstrInfo.inc.h
+PPCJITInfo.po: PPCGenRegisterInfo.inc.h
+PPCJITInfo.po: PPCGenSubtargetInfo.inc.h
+PPCMCInstLower.o: PPCGenInstrInfo.inc.h
+PPCMCInstLower.o: PPCGenRegisterInfo.inc.h
+PPCMCInstLower.o: PPCGenSubtargetInfo.inc.h
+PPCMCInstLower.po: PPCGenInstrInfo.inc.h
+PPCMCInstLower.po: PPCGenRegisterInfo.inc.h
+PPCMCInstLower.po: PPCGenSubtargetInfo.inc.h
+PPCRegisterInfo.o: PPCGenInstrInfo.inc.h
+PPCRegisterInfo.o: PPCGenRegisterInfo.inc.h
+PPCRegisterInfo.o: PPCGenSubtargetInfo.inc.h
+PPCRegisterInfo.po: PPCGenInstrInfo.inc.h
+PPCRegisterInfo.po: PPCGenRegisterInfo.inc.h
+PPCRegisterInfo.po: PPCGenSubtargetInfo.inc.h
+PPCSelectionDAGInfo.o: PPCGenInstrInfo.inc.h
+PPCSelectionDAGInfo.o: PPCGenRegisterInfo.inc.h
+PPCSelectionDAGInfo.o: PPCGenSubtargetInfo.inc.h
+PPCSelectionDAGInfo.po: PPCGenInstrInfo.inc.h
+PPCSelectionDAGInfo.po: PPCGenRegisterInfo.inc.h
+PPCSelectionDAGInfo.po: PPCGenSubtargetInfo.inc.h
+PPCSubtarget.o: PPCGenInstrInfo.inc.h
+PPCSubtarget.o: PPCGenRegisterInfo.inc.h
+PPCSubtarget.o: PPCGenSubtargetInfo.inc.h
+PPCSubtarget.po: PPCGenInstrInfo.inc.h
+PPCSubtarget.po: PPCGenRegisterInfo.inc.h
+PPCSubtarget.po: PPCGenSubtargetInfo.inc.h
+PPCTargetMachine.o: PPCGenInstrInfo.inc.h
+PPCTargetMachine.o: PPCGenRegisterInfo.inc.h
+PPCTargetMachine.o: PPCGenSubtargetInfo.inc.h
+PPCTargetMachine.po: PPCGenInstrInfo.inc.h
+PPCTargetMachine.po: PPCGenRegisterInfo.inc.h
+PPCTargetMachine.po: PPCGenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmpowerpcdesc/Makefile.depend b/lib/clang/libllvmpowerpcdesc/Makefile.depend
new file mode 100644
index 0000000..b67f8a9
--- /dev/null
+++ b/lib/clang/libllvmpowerpcdesc/Makefile.depend
@@ -0,0 +1,43 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+PPCAsmBackend.o: PPCGenInstrInfo.inc.h
+PPCAsmBackend.o: PPCGenRegisterInfo.inc.h
+PPCAsmBackend.o: PPCGenSubtargetInfo.inc.h
+PPCAsmBackend.po: PPCGenInstrInfo.inc.h
+PPCAsmBackend.po: PPCGenRegisterInfo.inc.h
+PPCAsmBackend.po: PPCGenSubtargetInfo.inc.h
+PPCELFObjectWriter.o: PPCGenInstrInfo.inc.h
+PPCELFObjectWriter.o: PPCGenRegisterInfo.inc.h
+PPCELFObjectWriter.o: PPCGenSubtargetInfo.inc.h
+PPCELFObjectWriter.po: PPCGenInstrInfo.inc.h
+PPCELFObjectWriter.po: PPCGenRegisterInfo.inc.h
+PPCELFObjectWriter.po: PPCGenSubtargetInfo.inc.h
+PPCMCCodeEmitter.o: PPCGenInstrInfo.inc.h
+PPCMCCodeEmitter.o: PPCGenMCCodeEmitter.inc.h
+PPCMCCodeEmitter.o: PPCGenRegisterInfo.inc.h
+PPCMCCodeEmitter.o: PPCGenSubtargetInfo.inc.h
+PPCMCCodeEmitter.po: PPCGenInstrInfo.inc.h
+PPCMCCodeEmitter.po: PPCGenMCCodeEmitter.inc.h
+PPCMCCodeEmitter.po: PPCGenRegisterInfo.inc.h
+PPCMCCodeEmitter.po: PPCGenSubtargetInfo.inc.h
+PPCMCTargetDesc.o: PPCGenInstrInfo.inc.h
+PPCMCTargetDesc.o: PPCGenRegisterInfo.inc.h
+PPCMCTargetDesc.o: PPCGenSubtargetInfo.inc.h
+PPCMCTargetDesc.po: PPCGenInstrInfo.inc.h
+PPCMCTargetDesc.po: PPCGenRegisterInfo.inc.h
+PPCMCTargetDesc.po: PPCGenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmpowerpcinfo/Makefile.depend b/lib/clang/libllvmpowerpcinfo/Makefile.depend
new file mode 100644
index 0000000..22102dc
--- /dev/null
+++ b/lib/clang/libllvmpowerpcinfo/Makefile.depend
@@ -0,0 +1,23 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+PowerPCTargetInfo.o: PPCGenInstrInfo.inc.h
+PowerPCTargetInfo.o: PPCGenRegisterInfo.inc.h
+PowerPCTargetInfo.o: PPCGenSubtargetInfo.inc.h
+PowerPCTargetInfo.po: PPCGenInstrInfo.inc.h
+PowerPCTargetInfo.po: PPCGenRegisterInfo.inc.h
+PowerPCTargetInfo.po: PPCGenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmpowerpcinstprinter/Makefile.depend b/lib/clang/libllvmpowerpcinstprinter/Makefile.depend
new file mode 100644
index 0000000..da1fa0f
--- /dev/null
+++ b/lib/clang/libllvmpowerpcinstprinter/Makefile.depend
@@ -0,0 +1,25 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+PPCInstPrinter.o: PPCGenAsmWriter.inc.h
+PPCInstPrinter.o: PPCGenInstrInfo.inc.h
+PPCInstPrinter.o: PPCGenRegisterInfo.inc.h
+PPCInstPrinter.o: PPCGenSubtargetInfo.inc.h
+PPCInstPrinter.po: PPCGenAsmWriter.inc.h
+PPCInstPrinter.po: PPCGenInstrInfo.inc.h
+PPCInstPrinter.po: PPCGenRegisterInfo.inc.h
+PPCInstPrinter.po: PPCGenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmruntimedyld/Makefile.depend b/lib/clang/libllvmruntimedyld/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmruntimedyld/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmscalaropts/Makefile.depend b/lib/clang/libllvmscalaropts/Makefile.depend
new file mode 100644
index 0000000..5b49aa4
--- /dev/null
+++ b/lib/clang/libllvmscalaropts/Makefile.depend
@@ -0,0 +1,59 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+ADCE.o: Intrinsics.inc.h
+ADCE.po: Intrinsics.inc.h
+CodeGenPrepare.o: Intrinsics.inc.h
+CodeGenPrepare.po: Intrinsics.inc.h
+DeadStoreElimination.o: Intrinsics.inc.h
+DeadStoreElimination.po: Intrinsics.inc.h
+GVN.o: Intrinsics.inc.h
+GVN.po: Intrinsics.inc.h
+GlobalMerge.o: Intrinsics.inc.h
+GlobalMerge.po: Intrinsics.inc.h
+IndVarSimplify.o: Intrinsics.inc.h
+IndVarSimplify.po: Intrinsics.inc.h
+JumpThreading.o: Intrinsics.inc.h
+JumpThreading.po: Intrinsics.inc.h
+LICM.o: Intrinsics.inc.h
+LICM.po: Intrinsics.inc.h
+LoopIdiomRecognize.o: Intrinsics.inc.h
+LoopIdiomRecognize.po: Intrinsics.inc.h
+LoopRotation.o: Intrinsics.inc.h
+LoopRotation.po: Intrinsics.inc.h
+LoopStrengthReduce.o: Intrinsics.inc.h
+LoopStrengthReduce.po: Intrinsics.inc.h
+LoopUnrollPass.o: Intrinsics.inc.h
+LoopUnrollPass.po: Intrinsics.inc.h
+LowerAtomic.o: Intrinsics.inc.h
+LowerAtomic.po: Intrinsics.inc.h
+MemCpyOptimizer.o: Intrinsics.inc.h
+MemCpyOptimizer.po: Intrinsics.inc.h
+ObjCARC.o: Intrinsics.inc.h
+ObjCARC.po: Intrinsics.inc.h
+Reassociate.o: Intrinsics.inc.h
+Reassociate.po: Intrinsics.inc.h
+ScalarReplAggregates.o: Intrinsics.inc.h
+ScalarReplAggregates.po: Intrinsics.inc.h
+SimplifyCFGPass.o: Intrinsics.inc.h
+SimplifyCFGPass.po: Intrinsics.inc.h
+SimplifyLibCalls.o: Intrinsics.inc.h
+SimplifyLibCalls.po: Intrinsics.inc.h
+Sink.o: Intrinsics.inc.h
+Sink.po: Intrinsics.inc.h
+TailRecursionElimination.o: Intrinsics.inc.h
+TailRecursionElimination.po: Intrinsics.inc.h
+.endif
diff --git a/lib/clang/libllvmselectiondag/Makefile.depend b/lib/clang/libllvmselectiondag/Makefile.depend
new file mode 100644
index 0000000..cae65c8
--- /dev/null
+++ b/lib/clang/libllvmselectiondag/Makefile.depend
@@ -0,0 +1,29 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+FastISel.o: Intrinsics.inc.h
+FastISel.po: Intrinsics.inc.h
+FunctionLoweringInfo.o: Intrinsics.inc.h
+FunctionLoweringInfo.po: Intrinsics.inc.h
+SelectionDAG.o: Intrinsics.inc.h
+SelectionDAG.po: Intrinsics.inc.h
+SelectionDAGBuilder.o: Intrinsics.inc.h
+SelectionDAGBuilder.po: Intrinsics.inc.h
+SelectionDAGDumper.o: Intrinsics.inc.h
+SelectionDAGDumper.po: Intrinsics.inc.h
+SelectionDAGISel.o: Intrinsics.inc.h
+SelectionDAGISel.po: Intrinsics.inc.h
+.endif
diff --git a/lib/clang/libllvmsupport/Makefile.depend b/lib/clang/libllvmsupport/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmsupport/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmtablegen/Makefile b/lib/clang/libllvmtablegen/Makefile
index 0832498..5ac6954 100644
--- a/lib/clang/libllvmtablegen/Makefile
+++ b/lib/clang/libllvmtablegen/Makefile
@@ -6,6 +6,7 @@ SRCDIR= lib/TableGen
SRCS= Error.cpp \
Main.cpp \
Record.cpp \
+ StringMatcher.cpp \
TableGenAction.cpp \
TableGenBackend.cpp \
TGLexer.cpp \
diff --git a/lib/clang/libllvmtablegen/Makefile.depend b/lib/clang/libllvmtablegen/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmtablegen/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmtarget/Makefile.depend b/lib/clang/libllvmtarget/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmtarget/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmtransformutils/Makefile.depend b/lib/clang/libllvmtransformutils/Makefile.depend
new file mode 100644
index 0000000..16320ac
--- /dev/null
+++ b/lib/clang/libllvmtransformutils/Makefile.depend
@@ -0,0 +1,41 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+BasicBlockUtils.o: Intrinsics.inc.h
+BasicBlockUtils.po: Intrinsics.inc.h
+BuildLibCalls.o: Intrinsics.inc.h
+BuildLibCalls.po: Intrinsics.inc.h
+CloneFunction.o: Intrinsics.inc.h
+CloneFunction.po: Intrinsics.inc.h
+CodeExtractor.o: Intrinsics.inc.h
+CodeExtractor.po: Intrinsics.inc.h
+InlineFunction.o: Intrinsics.inc.h
+InlineFunction.po: Intrinsics.inc.h
+Local.o: Intrinsics.inc.h
+Local.po: Intrinsics.inc.h
+LoopSimplify.o: Intrinsics.inc.h
+LoopSimplify.po: Intrinsics.inc.h
+LowerExpectIntrinsic.o: Intrinsics.inc.h
+LowerExpectIntrinsic.po: Intrinsics.inc.h
+LowerInvoke.o: Intrinsics.inc.h
+LowerInvoke.po: Intrinsics.inc.h
+PromoteMemoryToRegister.o: Intrinsics.inc.h
+PromoteMemoryToRegister.po: Intrinsics.inc.h
+SSAUpdater.o: Intrinsics.inc.h
+SSAUpdater.po: Intrinsics.inc.h
+SimplifyCFG.o: Intrinsics.inc.h
+SimplifyCFG.po: Intrinsics.inc.h
+.endif
diff --git a/lib/clang/libllvmvectorize/Makefile.depend b/lib/clang/libllvmvectorize/Makefile.depend
new file mode 100644
index 0000000..4bf1943
--- /dev/null
+++ b/lib/clang/libllvmvectorize/Makefile.depend
@@ -0,0 +1,19 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+BBVectorize.o: Intrinsics.inc.h
+BBVectorize.po: Intrinsics.inc.h
+.endif
diff --git a/lib/clang/libllvmx86asmparser/Makefile.depend b/lib/clang/libllvmx86asmparser/Makefile.depend
new file mode 100644
index 0000000..22486a9
--- /dev/null
+++ b/lib/clang/libllvmx86asmparser/Makefile.depend
@@ -0,0 +1,33 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+X86AsmLexer.o: X86GenAsmMatcher.inc.h
+X86AsmLexer.o: X86GenInstrInfo.inc.h
+X86AsmLexer.o: X86GenRegisterInfo.inc.h
+X86AsmLexer.o: X86GenSubtargetInfo.inc.h
+X86AsmLexer.po: X86GenAsmMatcher.inc.h
+X86AsmLexer.po: X86GenInstrInfo.inc.h
+X86AsmLexer.po: X86GenRegisterInfo.inc.h
+X86AsmLexer.po: X86GenSubtargetInfo.inc.h
+X86AsmParser.o: X86GenAsmMatcher.inc.h
+X86AsmParser.o: X86GenInstrInfo.inc.h
+X86AsmParser.o: X86GenRegisterInfo.inc.h
+X86AsmParser.o: X86GenSubtargetInfo.inc.h
+X86AsmParser.po: X86GenAsmMatcher.inc.h
+X86AsmParser.po: X86GenInstrInfo.inc.h
+X86AsmParser.po: X86GenRegisterInfo.inc.h
+X86AsmParser.po: X86GenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmx86codegen/Makefile.depend b/lib/clang/libllvmx86codegen/Makefile.depend
new file mode 100644
index 0000000..f1da7d6
--- /dev/null
+++ b/lib/clang/libllvmx86codegen/Makefile.depend
@@ -0,0 +1,127 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+X86AsmPrinter.o: X86GenInstrInfo.inc.h
+X86AsmPrinter.o: X86GenRegisterInfo.inc.h
+X86AsmPrinter.o: X86GenSubtargetInfo.inc.h
+X86AsmPrinter.po: X86GenInstrInfo.inc.h
+X86AsmPrinter.po: X86GenRegisterInfo.inc.h
+X86AsmPrinter.po: X86GenSubtargetInfo.inc.h
+X86CodeEmitter.o: X86GenInstrInfo.inc.h
+X86CodeEmitter.o: X86GenRegisterInfo.inc.h
+X86CodeEmitter.o: X86GenSubtargetInfo.inc.h
+X86CodeEmitter.po: X86GenInstrInfo.inc.h
+X86CodeEmitter.po: X86GenRegisterInfo.inc.h
+X86CodeEmitter.po: X86GenSubtargetInfo.inc.h
+X86FastISel.o: Intrinsics.inc.h
+X86FastISel.o: X86GenCallingConv.inc.h
+X86FastISel.o: X86GenFastISel.inc.h
+X86FastISel.o: X86GenInstrInfo.inc.h
+X86FastISel.o: X86GenRegisterInfo.inc.h
+X86FastISel.o: X86GenSubtargetInfo.inc.h
+X86FastISel.po: Intrinsics.inc.h
+X86FastISel.po: X86GenCallingConv.inc.h
+X86FastISel.po: X86GenFastISel.inc.h
+X86FastISel.po: X86GenInstrInfo.inc.h
+X86FastISel.po: X86GenRegisterInfo.inc.h
+X86FastISel.po: X86GenSubtargetInfo.inc.h
+X86FloatingPoint.o: X86GenInstrInfo.inc.h
+X86FloatingPoint.o: X86GenRegisterInfo.inc.h
+X86FloatingPoint.o: X86GenSubtargetInfo.inc.h
+X86FloatingPoint.po: X86GenInstrInfo.inc.h
+X86FloatingPoint.po: X86GenRegisterInfo.inc.h
+X86FloatingPoint.po: X86GenSubtargetInfo.inc.h
+X86FrameLowering.o: X86GenInstrInfo.inc.h
+X86FrameLowering.o: X86GenRegisterInfo.inc.h
+X86FrameLowering.o: X86GenSubtargetInfo.inc.h
+X86FrameLowering.po: X86GenInstrInfo.inc.h
+X86FrameLowering.po: X86GenRegisterInfo.inc.h
+X86FrameLowering.po: X86GenSubtargetInfo.inc.h
+X86ISelDAGToDAG.o: Intrinsics.inc.h
+X86ISelDAGToDAG.o: X86GenDAGISel.inc.h
+X86ISelDAGToDAG.o: X86GenInstrInfo.inc.h
+X86ISelDAGToDAG.o: X86GenRegisterInfo.inc.h
+X86ISelDAGToDAG.o: X86GenSubtargetInfo.inc.h
+X86ISelDAGToDAG.po: Intrinsics.inc.h
+X86ISelDAGToDAG.po: X86GenDAGISel.inc.h
+X86ISelDAGToDAG.po: X86GenInstrInfo.inc.h
+X86ISelDAGToDAG.po: X86GenRegisterInfo.inc.h
+X86ISelDAGToDAG.po: X86GenSubtargetInfo.inc.h
+X86ISelLowering.o: Intrinsics.inc.h
+X86ISelLowering.o: X86GenCallingConv.inc.h
+X86ISelLowering.o: X86GenInstrInfo.inc.h
+X86ISelLowering.o: X86GenRegisterInfo.inc.h
+X86ISelLowering.o: X86GenSubtargetInfo.inc.h
+X86ISelLowering.po: Intrinsics.inc.h
+X86ISelLowering.po: X86GenCallingConv.inc.h
+X86ISelLowering.po: X86GenInstrInfo.inc.h
+X86ISelLowering.po: X86GenRegisterInfo.inc.h
+X86ISelLowering.po: X86GenSubtargetInfo.inc.h
+X86InstrInfo.o: X86GenInstrInfo.inc.h
+X86InstrInfo.o: X86GenRegisterInfo.inc.h
+X86InstrInfo.o: X86GenSubtargetInfo.inc.h
+X86InstrInfo.po: X86GenInstrInfo.inc.h
+X86InstrInfo.po: X86GenRegisterInfo.inc.h
+X86InstrInfo.po: X86GenSubtargetInfo.inc.h
+X86JITInfo.o: X86GenInstrInfo.inc.h
+X86JITInfo.o: X86GenRegisterInfo.inc.h
+X86JITInfo.o: X86GenSubtargetInfo.inc.h
+X86JITInfo.po: X86GenInstrInfo.inc.h
+X86JITInfo.po: X86GenRegisterInfo.inc.h
+X86JITInfo.po: X86GenSubtargetInfo.inc.h
+X86MCInstLower.o: X86GenInstrInfo.inc.h
+X86MCInstLower.o: X86GenRegisterInfo.inc.h
+X86MCInstLower.o: X86GenSubtargetInfo.inc.h
+X86MCInstLower.po: X86GenInstrInfo.inc.h
+X86MCInstLower.po: X86GenRegisterInfo.inc.h
+X86MCInstLower.po: X86GenSubtargetInfo.inc.h
+X86RegisterInfo.o: X86GenInstrInfo.inc.h
+X86RegisterInfo.o: X86GenRegisterInfo.inc.h
+X86RegisterInfo.o: X86GenSubtargetInfo.inc.h
+X86RegisterInfo.po: X86GenInstrInfo.inc.h
+X86RegisterInfo.po: X86GenRegisterInfo.inc.h
+X86RegisterInfo.po: X86GenSubtargetInfo.inc.h
+X86SelectionDAGInfo.o: X86GenInstrInfo.inc.h
+X86SelectionDAGInfo.o: X86GenRegisterInfo.inc.h
+X86SelectionDAGInfo.o: X86GenSubtargetInfo.inc.h
+X86SelectionDAGInfo.po: X86GenInstrInfo.inc.h
+X86SelectionDAGInfo.po: X86GenRegisterInfo.inc.h
+X86SelectionDAGInfo.po: X86GenSubtargetInfo.inc.h
+X86Subtarget.o: X86GenInstrInfo.inc.h
+X86Subtarget.o: X86GenRegisterInfo.inc.h
+X86Subtarget.o: X86GenSubtargetInfo.inc.h
+X86Subtarget.po: X86GenInstrInfo.inc.h
+X86Subtarget.po: X86GenRegisterInfo.inc.h
+X86Subtarget.po: X86GenSubtargetInfo.inc.h
+X86TargetMachine.o: X86GenInstrInfo.inc.h
+X86TargetMachine.o: X86GenRegisterInfo.inc.h
+X86TargetMachine.o: X86GenSubtargetInfo.inc.h
+X86TargetMachine.po: X86GenInstrInfo.inc.h
+X86TargetMachine.po: X86GenRegisterInfo.inc.h
+X86TargetMachine.po: X86GenSubtargetInfo.inc.h
+X86TargetObjectFile.o: X86GenInstrInfo.inc.h
+X86TargetObjectFile.o: X86GenRegisterInfo.inc.h
+X86TargetObjectFile.o: X86GenSubtargetInfo.inc.h
+X86TargetObjectFile.po: X86GenInstrInfo.inc.h
+X86TargetObjectFile.po: X86GenRegisterInfo.inc.h
+X86TargetObjectFile.po: X86GenSubtargetInfo.inc.h
+X86VZeroUpper.o: X86GenInstrInfo.inc.h
+X86VZeroUpper.o: X86GenRegisterInfo.inc.h
+X86VZeroUpper.o: X86GenSubtargetInfo.inc.h
+X86VZeroUpper.po: X86GenInstrInfo.inc.h
+X86VZeroUpper.po: X86GenRegisterInfo.inc.h
+X86VZeroUpper.po: X86GenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmx86desc/Makefile.depend b/lib/clang/libllvmx86desc/Makefile.depend
new file mode 100644
index 0000000..2c335d7
--- /dev/null
+++ b/lib/clang/libllvmx86desc/Makefile.depend
@@ -0,0 +1,53 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+X86AsmBackend.o: X86GenInstrInfo.inc.h
+X86AsmBackend.o: X86GenRegisterInfo.inc.h
+X86AsmBackend.o: X86GenSubtargetInfo.inc.h
+X86AsmBackend.po: X86GenInstrInfo.inc.h
+X86AsmBackend.po: X86GenRegisterInfo.inc.h
+X86AsmBackend.po: X86GenSubtargetInfo.inc.h
+X86ELFObjectWriter.o: X86GenInstrInfo.inc.h
+X86ELFObjectWriter.o: X86GenRegisterInfo.inc.h
+X86ELFObjectWriter.o: X86GenSubtargetInfo.inc.h
+X86ELFObjectWriter.po: X86GenInstrInfo.inc.h
+X86ELFObjectWriter.po: X86GenRegisterInfo.inc.h
+X86ELFObjectWriter.po: X86GenSubtargetInfo.inc.h
+X86MCCodeEmitter.o: X86GenInstrInfo.inc.h
+X86MCCodeEmitter.o: X86GenRegisterInfo.inc.h
+X86MCCodeEmitter.o: X86GenSubtargetInfo.inc.h
+X86MCCodeEmitter.po: X86GenInstrInfo.inc.h
+X86MCCodeEmitter.po: X86GenRegisterInfo.inc.h
+X86MCCodeEmitter.po: X86GenSubtargetInfo.inc.h
+X86MCTargetDesc.o: X86GenInstrInfo.inc.h
+X86MCTargetDesc.o: X86GenRegisterInfo.inc.h
+X86MCTargetDesc.o: X86GenSubtargetInfo.inc.h
+X86MCTargetDesc.po: X86GenInstrInfo.inc.h
+X86MCTargetDesc.po: X86GenRegisterInfo.inc.h
+X86MCTargetDesc.po: X86GenSubtargetInfo.inc.h
+X86MachObjectWriter.o: X86GenInstrInfo.inc.h
+X86MachObjectWriter.o: X86GenRegisterInfo.inc.h
+X86MachObjectWriter.o: X86GenSubtargetInfo.inc.h
+X86MachObjectWriter.po: X86GenInstrInfo.inc.h
+X86MachObjectWriter.po: X86GenRegisterInfo.inc.h
+X86MachObjectWriter.po: X86GenSubtargetInfo.inc.h
+X86WinCOFFObjectWriter.o: X86GenInstrInfo.inc.h
+X86WinCOFFObjectWriter.o: X86GenRegisterInfo.inc.h
+X86WinCOFFObjectWriter.o: X86GenSubtargetInfo.inc.h
+X86WinCOFFObjectWriter.po: X86GenInstrInfo.inc.h
+X86WinCOFFObjectWriter.po: X86GenRegisterInfo.inc.h
+X86WinCOFFObjectWriter.po: X86GenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmx86disassembler/Makefile.depend b/lib/clang/libllvmx86disassembler/Makefile.depend
new file mode 100644
index 0000000..4c1fae9
--- /dev/null
+++ b/lib/clang/libllvmx86disassembler/Makefile.depend
@@ -0,0 +1,23 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+X86Disassembler.o: X86GenEDInfo.inc.h
+X86Disassembler.o: X86GenInstrInfo.inc.h
+X86Disassembler.o: X86GenRegisterInfo.inc.h
+X86Disassembler.po: X86GenEDInfo.inc.h
+X86Disassembler.po: X86GenInstrInfo.inc.h
+X86Disassembler.po: X86GenRegisterInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmx86info/Makefile.depend b/lib/clang/libllvmx86info/Makefile.depend
new file mode 100644
index 0000000..2da8b53
--- /dev/null
+++ b/lib/clang/libllvmx86info/Makefile.depend
@@ -0,0 +1,23 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+X86TargetInfo.o: X86GenInstrInfo.inc.h
+X86TargetInfo.o: X86GenRegisterInfo.inc.h
+X86TargetInfo.o: X86GenSubtargetInfo.inc.h
+X86TargetInfo.po: X86GenInstrInfo.inc.h
+X86TargetInfo.po: X86GenRegisterInfo.inc.h
+X86TargetInfo.po: X86GenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmx86instprinter/Makefile.depend b/lib/clang/libllvmx86instprinter/Makefile.depend
new file mode 100644
index 0000000..9eafb91
--- /dev/null
+++ b/lib/clang/libllvmx86instprinter/Makefile.depend
@@ -0,0 +1,39 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+X86ATTInstPrinter.o: X86GenAsmWriter.inc.h
+X86ATTInstPrinter.o: X86GenInstrInfo.inc.h
+X86ATTInstPrinter.o: X86GenRegisterInfo.inc.h
+X86ATTInstPrinter.o: X86GenSubtargetInfo.inc.h
+X86ATTInstPrinter.po: X86GenAsmWriter.inc.h
+X86ATTInstPrinter.po: X86GenInstrInfo.inc.h
+X86ATTInstPrinter.po: X86GenRegisterInfo.inc.h
+X86ATTInstPrinter.po: X86GenSubtargetInfo.inc.h
+X86InstComments.o: X86GenInstrInfo.inc.h
+X86InstComments.o: X86GenRegisterInfo.inc.h
+X86InstComments.o: X86GenSubtargetInfo.inc.h
+X86InstComments.po: X86GenInstrInfo.inc.h
+X86InstComments.po: X86GenRegisterInfo.inc.h
+X86InstComments.po: X86GenSubtargetInfo.inc.h
+X86IntelInstPrinter.o: X86GenAsmWriter1.inc.h
+X86IntelInstPrinter.o: X86GenInstrInfo.inc.h
+X86IntelInstPrinter.o: X86GenRegisterInfo.inc.h
+X86IntelInstPrinter.o: X86GenSubtargetInfo.inc.h
+X86IntelInstPrinter.po: X86GenAsmWriter1.inc.h
+X86IntelInstPrinter.po: X86GenInstrInfo.inc.h
+X86IntelInstPrinter.po: X86GenRegisterInfo.inc.h
+X86IntelInstPrinter.po: X86GenSubtargetInfo.inc.h
+.endif
diff --git a/lib/clang/libllvmx86utils/Makefile.depend b/lib/clang/libllvmx86utils/Makefile.depend
new file mode 100644
index 0000000..6a3fc33
--- /dev/null
+++ b/lib/clang/libllvmx86utils/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/csu/amd64/Makefile b/lib/csu/amd64/Makefile
index 80d14a7..5ddbab6 100644
--- a/lib/csu/amd64/Makefile
+++ b/lib/csu/amd64/Makefile
@@ -9,6 +9,12 @@ CFLAGS+= -I${.CURDIR}/../common \
-I${.CURDIR}/../../libc/include
CFLAGS+= -fno-omit-frame-pointer
+FILES= ${OBJS}
+FILESOWN= ${LIBOWN}
+FILESGRP= ${LIBGRP}
+FILESMODE= ${LIBMODE}
+FILESDIR= ${LIBDIR}
+
all: ${OBJS}
CLEANFILES= ${OBJS}
@@ -38,8 +44,5 @@ Scrt1.s: crt1.c
Scrt1.o: Scrt1.s
${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s
-realinstall:
- ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
- ${OBJS} ${DESTDIR}${LIBDIR}
-.include <bsd.lib.mk>
+.include <bsd.prog.mk>
diff --git a/lib/csu/amd64/Makefile.depend b/lib/csu/amd64/Makefile.depend
new file mode 100644
index 0000000..ff699f7
--- /dev/null
+++ b/lib/csu/amd64/Makefile.depend
@@ -0,0 +1,15 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/csu/arm/Makefile.depend b/lib/csu/arm/Makefile.depend
new file mode 100644
index 0000000..ff699f7
--- /dev/null
+++ b/lib/csu/arm/Makefile.depend
@@ -0,0 +1,15 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/csu/i386-elf/Makefile b/lib/csu/i386-elf/Makefile
index 286c15c..52e1955 100644
--- a/lib/csu/i386-elf/Makefile
+++ b/lib/csu/i386-elf/Makefile
@@ -24,7 +24,7 @@ gcrt1_c.o: gcrt1_c.s
${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1_c.s
gcrt1.o: gcrt1_c.o crt1_s.o
- ${LD} ${LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o
+ ${LD} ${LDFLAGS:N-[BL]/*} -o gcrt1.o -r crt1_s.o gcrt1_c.o
crt1_c.s: crt1_c.c
${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1_c.c
@@ -34,7 +34,7 @@ crt1_c.o: crt1_c.s
${CC} ${ACFLAGS} -c -o ${.TARGET} crt1_c.s
crt1.o: crt1_c.o crt1_s.o
- ${LD} ${LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o
+ ${LD} ${LDFLAGS:N-[BL]/*} -o crt1.o -r crt1_s.o crt1_c.o
objcopy --localize-symbol _start1 crt1.o
Scrt1_c.s: crt1_c.c
@@ -45,7 +45,7 @@ Scrt1_c.o: Scrt1_c.s
${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1_c.s
Scrt1.o: Scrt1_c.o crt1_s.o
- ${LD} ${LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o
+ ${LD} ${LDFLAGS:N-[BL]/*} -o Scrt1.o -r crt1_s.o Scrt1_c.o
objcopy --localize-symbol _start1 Scrt1.o
.include <bsd.prog.mk>
diff --git a/lib/csu/i386-elf/Makefile.depend b/lib/csu/i386-elf/Makefile.depend
new file mode 100644
index 0000000..ff699f7
--- /dev/null
+++ b/lib/csu/i386-elf/Makefile.depend
@@ -0,0 +1,15 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/csu/mips/Makefile.depend b/lib/csu/mips/Makefile.depend
new file mode 100644
index 0000000..ff699f7
--- /dev/null
+++ b/lib/csu/mips/Makefile.depend
@@ -0,0 +1,15 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/csu/powerpc/Makefile.depend b/lib/csu/powerpc/Makefile.depend
new file mode 100644
index 0000000..ff699f7
--- /dev/null
+++ b/lib/csu/powerpc/Makefile.depend
@@ -0,0 +1,15 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/csu/powerpc64/Makefile.depend b/lib/csu/powerpc64/Makefile.depend
new file mode 100644
index 0000000..ff699f7
--- /dev/null
+++ b/lib/csu/powerpc64/Makefile.depend
@@ -0,0 +1,15 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/csu/sparc64/Makefile.depend b/lib/csu/sparc64/Makefile.depend
new file mode 100644
index 0000000..ff699f7
--- /dev/null
+++ b/lib/csu/sparc64/Makefile.depend
@@ -0,0 +1,15 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libalias/libalias/Makefile.depend b/lib/libalias/libalias/Makefile.depend
new file mode 100644
index 0000000..e54ec8c
--- /dev/null
+++ b/lib/libalias/libalias/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libalias/modules/cuseeme/Makefile.depend b/lib/libalias/modules/cuseeme/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libalias/modules/cuseeme/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libalias/modules/dummy/Makefile.depend b/lib/libalias/modules/dummy/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libalias/modules/dummy/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libalias/modules/ftp/Makefile.depend b/lib/libalias/modules/ftp/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libalias/modules/ftp/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libalias/modules/irc/Makefile.depend b/lib/libalias/modules/irc/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libalias/modules/irc/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libalias/modules/nbt/Makefile.depend b/lib/libalias/modules/nbt/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libalias/modules/nbt/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libalias/modules/pptp/Makefile.depend b/lib/libalias/modules/pptp/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libalias/modules/pptp/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libalias/modules/skinny/Makefile.depend b/lib/libalias/modules/skinny/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libalias/modules/skinny/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libalias/modules/smedia/Makefile.depend b/lib/libalias/modules/smedia/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libalias/modules/smedia/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libarchive/Makefile b/lib/libarchive/Makefile
index 018ad32..29508ad 100644
--- a/lib/libarchive/Makefile
+++ b/lib/libarchive/Makefile
@@ -63,7 +63,10 @@ SRCS= archive_acl.c \
archive_entry_stat.c \
archive_entry_strmode.c \
archive_entry_xattr.c \
+ archive_getdate.c \
+ archive_match.c \
archive_options.c \
+ archive_pathmatch.c \
archive_ppmd7.c \
archive_rb.c \
archive_read.c \
@@ -106,6 +109,8 @@ SRCS= archive_acl.c \
archive_util.c \
archive_virtual.c \
archive_write.c \
+ archive_write_add_filter.c \
+ archive_write_disk_acl.c \
archive_write_disk_set_standard_lookup.c \
archive_write_disk_posix.c \
archive_write_open_fd.c \
diff --git a/lib/libarchive/Makefile.depend b/lib/libarchive/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libarchive/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libarchive/config_freebsd.h b/lib/libarchive/config_freebsd.h
index 0a39aa6..214ffd1 100644
--- a/lib/libarchive/config_freebsd.h
+++ b/lib/libarchive/config_freebsd.h
@@ -31,10 +31,12 @@
#define HAVE_ACL_GET_LINK_NP 1
#define HAVE_ACL_GET_PERM_NP 1
#define HAVE_ACL_INIT 1
+#define HAVE_ACL_IS_TRIVIAL_NP 1
#define HAVE_ACL_PERMSET_T 1
#define HAVE_ACL_SET_FD 1
#define HAVE_ACL_SET_FD_NP 1
#define HAVE_ACL_SET_FILE 1
+#define HAVE_ACL_SET_LINK_NP 1
#define HAVE_ACL_USER 1
#define HAVE_EXTATTR_GET_FILE 1
#define HAVE_EXTATTR_LIST_FILE 1
@@ -129,7 +131,6 @@
#define HAVE_LSTAT 1
#define HAVE_LUTIMES 1
#define HAVE_MBRTOWC 1
-#define HAVE_MBSNRTOWCS 1
#define HAVE_MEMMOVE 1
#define HAVE_MEMORY_H 1
#define HAVE_MEMSET 1
@@ -206,7 +207,6 @@
#define HAVE_WCSCMP 1
#define HAVE_WCSCPY 1
#define HAVE_WCSLEN 1
-#define HAVE_WCSNRTOMBS 1
#define HAVE_WCTOMB 1
#define HAVE_WCTYPE_H 1
#define HAVE_WMEMCMP 1
diff --git a/lib/libarchive/test/Makefile b/lib/libarchive/test/Makefile
index f4865b9..5e7c7a4 100644
--- a/lib/libarchive/test/Makefile
+++ b/lib/libarchive/test/Makefile
@@ -19,13 +19,19 @@ CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
.PATH: ${LIBARCHIVEDIR}/libarchive/test
TESTS= \
- test_acl_freebsd.c \
+ test_acl_freebsd_nfs4.c \
+ test_acl_freebsd_posix1e.c \
test_acl_nfs4.c \
test_acl_pax.c \
test_acl_posix1e.c \
test_archive_api_feature.c \
test_archive_clear_error.c \
test_archive_crypto.c \
+ test_archive_getdate.c \
+ test_archive_match_time.c \
+ test_archive_match_owner.c \
+ test_archive_match_path.c \
+ test_archive_pathmatch.c \
test_archive_read_close_twice.c \
test_archive_read_close_twice_open_fd.c \
test_archive_read_close_twice_open_filename.c \
diff --git a/lib/libauditd/Makefile.depend b/lib/libauditd/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libauditd/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libbegemot/Makefile.depend b/lib/libbegemot/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libbegemot/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libblocksruntime/Makefile.depend b/lib/libblocksruntime/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libblocksruntime/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libbluetooth/Makefile.depend b/lib/libbluetooth/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libbluetooth/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libbsm/Makefile.depend b/lib/libbsm/Makefile.depend
new file mode 100644
index 0000000..e54ec8c
--- /dev/null
+++ b/lib/libbsm/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libbsnmp/libbsnmp/Makefile.depend b/lib/libbsnmp/libbsnmp/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libbsnmp/libbsnmp/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libbz2/Makefile.depend b/lib/libbz2/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libbz2/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile
index 1c65cc3..d1d7017 100644
--- a/lib/libc++/Makefile
+++ b/lib/libc++/Makefile
@@ -35,8 +35,27 @@ SRCS+= algorithm.cpp\
utility.cpp\
valarray.cpp
+CXXRT_SRCS+= libelftc_dem_gnu3.c\
+ terminate.cc\
+ dynamic_cast.cc\
+ memory.cc\
+ auxhelper.cc\
+ exception.cc\
+ stdexcept.cc\
+ typeinfo.cc\
+ guard.cc
+
+.for _S in ${CXXRT_SRCS}
+STATICOBJS+= cxxrt_${_S:R}.o
+cxxrt_${_S}:
+ ln -sf ${LIBCXXRTDIR}/${_S} ${.TARGET}
+.endfor
+
WARNS= 0
-CXXFLAGS+= -I${HDRDIR} -I${LIBCXXRTDIR} -std=c++0x -nostdlib -DLIBCXXRT
+CFLAGS+= -I${HDRDIR} -I${LIBCXXRTDIR} -nostdlib -DLIBCXXRT
+.if empty(CXXFLAGS:M-std=*)
+CXXFLAGS+= -std=c++0x
+.endif
DPADD= ${LIBCXXRT}
LDADD= -lcxxrt
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
index ed37053..ad98d41 100644
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -149,6 +149,16 @@ libkern.${LIBC_ARCH}:: ${KMSRCS}
.include <bsd.lib.mk>
+.if !defined(_SKIP_BUILD)
+# We need libutil.h, get it directly to avoid
+# recording a build dependency
+CFLAGS+= -I${.CURDIR:H}/libutil
+# Same issue with libm
+MSUN_ARCH_SUBDIR != ${MAKE} -B -C ${.CURDIR:H}/msun -V ARCH_SUBDIR
+# unfortunately msun/src contains both private and public headers
+CFLAGS+= -I${.CURDIR:H}/msun/${MSUN_ARCH_SUBDIR} -I${.CURDIR:H}/msun/src
+.endif
+
# Disable warnings in contributed sources.
CWARNFLAGS:= ${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/:C/^$/-w/}
# XXX For now, we don't allow libc to be compiled with
diff --git a/lib/libc/Makefile.depend b/lib/libc/Makefile.depend
new file mode 100644
index 0000000..080d7af
--- /dev/null
+++ b/lib/libc/Makefile.depend
@@ -0,0 +1,167 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/rpc \
+ include/rpcsvc \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+cancelpoints_sem.So: cancelpoints_sem.c
+cancelpoints_sem.o: cancelpoints_sem.c
+cancelpoints_sem.po: cancelpoints_sem.c
+cancelpoints_sem_new.So: cancelpoints_sem_new.c
+cancelpoints_sem_new.o: cancelpoints_sem_new.c
+cancelpoints_sem_new.po: cancelpoints_sem_new.c
+crypt_clnt.So: crypt.h
+crypt_clnt.So: crypt_clnt.c
+crypt_clnt.o: crypt.h
+crypt_clnt.o: crypt_clnt.c
+crypt_clnt.po: crypt.h
+crypt_clnt.po: crypt_clnt.c
+crypt_xdr.So: crypt.h
+crypt_xdr.So: crypt_xdr.c
+crypt_xdr.o: crypt.h
+crypt_xdr.o: crypt_xdr.c
+crypt_xdr.po: crypt.h
+crypt_xdr.po: crypt_xdr.c
+gdtoa_dmisc.So: gdtoa_dmisc.c
+gdtoa_dmisc.o: gdtoa_dmisc.c
+gdtoa_dmisc.po: gdtoa_dmisc.c
+gdtoa_dtoa.So: gdtoa_dtoa.c
+gdtoa_dtoa.o: gdtoa_dtoa.c
+gdtoa_dtoa.po: gdtoa_dtoa.c
+gdtoa_gdtoa.So: gdtoa_gdtoa.c
+gdtoa_gdtoa.o: gdtoa_gdtoa.c
+gdtoa_gdtoa.po: gdtoa_gdtoa.c
+gdtoa_gethex.So: gdtoa_gethex.c
+gdtoa_gethex.o: gdtoa_gethex.c
+gdtoa_gethex.po: gdtoa_gethex.c
+gdtoa_gmisc.So: gdtoa_gmisc.c
+gdtoa_gmisc.o: gdtoa_gmisc.c
+gdtoa_gmisc.po: gdtoa_gmisc.c
+gdtoa_hd_init.So: gdtoa_hd_init.c
+gdtoa_hd_init.o: gdtoa_hd_init.c
+gdtoa_hd_init.po: gdtoa_hd_init.c
+gdtoa_hexnan.So: gdtoa_hexnan.c
+gdtoa_hexnan.o: gdtoa_hexnan.c
+gdtoa_hexnan.po: gdtoa_hexnan.c
+gdtoa_misc.So: gdtoa_misc.c
+gdtoa_misc.o: gdtoa_misc.c
+gdtoa_misc.po: gdtoa_misc.c
+gdtoa_smisc.So: gdtoa_smisc.c
+gdtoa_smisc.o: gdtoa_smisc.c
+gdtoa_smisc.po: gdtoa_smisc.c
+gdtoa_strtod.So: gdtoa_strtod.c
+gdtoa_strtod.o: gdtoa_strtod.c
+gdtoa_strtod.po: gdtoa_strtod.c
+gdtoa_strtodg.So: gdtoa_strtodg.c
+gdtoa_strtodg.o: gdtoa_strtodg.c
+gdtoa_strtodg.po: gdtoa_strtodg.c
+gdtoa_strtof.So: gdtoa_strtof.c
+gdtoa_strtof.o: gdtoa_strtof.c
+gdtoa_strtof.po: gdtoa_strtof.c
+gdtoa_strtord.So: gdtoa_strtord.c
+gdtoa_strtord.o: gdtoa_strtord.c
+gdtoa_strtord.po: gdtoa_strtord.c
+gdtoa_strtorx.So: gdtoa_strtorx.c
+gdtoa_strtorx.o: gdtoa_strtorx.c
+gdtoa_strtorx.po: gdtoa_strtorx.c
+gdtoa_sum.So: gdtoa_sum.c
+gdtoa_sum.o: gdtoa_sum.c
+gdtoa_sum.po: gdtoa_sum.c
+gdtoa_ulp.So: gdtoa_ulp.c
+gdtoa_ulp.o: gdtoa_ulp.c
+gdtoa_ulp.po: gdtoa_ulp.c
+jemalloc_arena.So: jemalloc_arena.c
+jemalloc_arena.o: jemalloc_arena.c
+jemalloc_arena.po: jemalloc_arena.c
+jemalloc_atomic.So: jemalloc_atomic.c
+jemalloc_atomic.o: jemalloc_atomic.c
+jemalloc_atomic.po: jemalloc_atomic.c
+jemalloc_base.So: jemalloc_base.c
+jemalloc_base.o: jemalloc_base.c
+jemalloc_base.po: jemalloc_base.c
+jemalloc_bitmap.So: jemalloc_bitmap.c
+jemalloc_bitmap.o: jemalloc_bitmap.c
+jemalloc_bitmap.po: jemalloc_bitmap.c
+jemalloc_chunk.So: jemalloc_chunk.c
+jemalloc_chunk.o: jemalloc_chunk.c
+jemalloc_chunk.po: jemalloc_chunk.c
+jemalloc_chunk_dss.So: jemalloc_chunk_dss.c
+jemalloc_chunk_dss.o: jemalloc_chunk_dss.c
+jemalloc_chunk_dss.po: jemalloc_chunk_dss.c
+jemalloc_chunk_mmap.So: jemalloc_chunk_mmap.c
+jemalloc_chunk_mmap.o: jemalloc_chunk_mmap.c
+jemalloc_chunk_mmap.po: jemalloc_chunk_mmap.c
+jemalloc_ckh.So: jemalloc_ckh.c
+jemalloc_ckh.o: jemalloc_ckh.c
+jemalloc_ckh.po: jemalloc_ckh.c
+jemalloc_ctl.So: jemalloc_ctl.c
+jemalloc_ctl.o: jemalloc_ctl.c
+jemalloc_ctl.po: jemalloc_ctl.c
+jemalloc_extent.So: jemalloc_extent.c
+jemalloc_extent.o: jemalloc_extent.c
+jemalloc_extent.po: jemalloc_extent.c
+jemalloc_hash.So: jemalloc_hash.c
+jemalloc_hash.o: jemalloc_hash.c
+jemalloc_hash.po: jemalloc_hash.c
+jemalloc_huge.So: jemalloc_huge.c
+jemalloc_huge.o: jemalloc_huge.c
+jemalloc_huge.po: jemalloc_huge.c
+jemalloc_jemalloc.So: jemalloc_jemalloc.c
+jemalloc_jemalloc.o: jemalloc_jemalloc.c
+jemalloc_jemalloc.po: jemalloc_jemalloc.c
+jemalloc_mb.So: jemalloc_mb.c
+jemalloc_mb.o: jemalloc_mb.c
+jemalloc_mb.po: jemalloc_mb.c
+jemalloc_mutex.So: jemalloc_mutex.c
+jemalloc_mutex.o: jemalloc_mutex.c
+jemalloc_mutex.po: jemalloc_mutex.c
+jemalloc_prof.So: jemalloc_prof.c
+jemalloc_prof.o: jemalloc_prof.c
+jemalloc_prof.po: jemalloc_prof.c
+jemalloc_quarantine.So: jemalloc_quarantine.c
+jemalloc_quarantine.o: jemalloc_quarantine.c
+jemalloc_quarantine.po: jemalloc_quarantine.c
+jemalloc_rtree.So: jemalloc_rtree.c
+jemalloc_rtree.o: jemalloc_rtree.c
+jemalloc_rtree.po: jemalloc_rtree.c
+jemalloc_stats.So: jemalloc_stats.c
+jemalloc_stats.o: jemalloc_stats.c
+jemalloc_stats.po: jemalloc_stats.c
+jemalloc_tcache.So: jemalloc_tcache.c
+jemalloc_tcache.o: jemalloc_tcache.c
+jemalloc_tcache.po: jemalloc_tcache.c
+jemalloc_tsd.So: jemalloc_tsd.c
+jemalloc_tsd.o: jemalloc_tsd.c
+jemalloc_tsd.po: jemalloc_tsd.c
+jemalloc_util.So: jemalloc_util.c
+jemalloc_util.o: jemalloc_util.c
+jemalloc_util.po: jemalloc_util.c
+nslexer.So: nslexer.c
+nslexer.So: nsparser.h
+nslexer.o: nslexer.c
+nslexer.o: nsparser.h
+nslexer.po: nslexer.c
+nslexer.po: nsparser.h
+nsparser.So: nsparser.c
+nsparser.o: nsparser.c
+nsparser.po: nsparser.c
+subr_acl_nfs4.So: subr_acl_nfs4.c
+subr_acl_nfs4.o: subr_acl_nfs4.c
+subr_acl_nfs4.po: subr_acl_nfs4.c
+yp_xdr.So: yp.h
+yp_xdr.So: yp_xdr.c
+yp_xdr.o: yp.h
+yp_xdr.o: yp_xdr.c
+yp_xdr.po: yp.h
+yp_xdr.po: yp_xdr.c
+.endif
diff --git a/lib/libc/amd64/SYS.h b/lib/libc/amd64/SYS.h
index 61d7ab4..a232383 100644
--- a/lib/libc/amd64/SYS.h
+++ b/lib/libc/amd64/SYS.h
@@ -36,38 +36,20 @@
#include <sys/syscall.h>
#include <machine/asm.h>
-#ifdef PIC
#define RSYSCALL(x) ENTRY(__CONCAT(__sys_,x)); \
.weak CNAME(x); \
.set CNAME(x),CNAME(__CONCAT(__sys_,x)); \
.weak CNAME(__CONCAT(_,x)); \
.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
- mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret; \
- 2: movq PIC_GOT(HIDENAME(cerror)),%rcx; jmp *%rcx; \
+ mov __CONCAT($SYS_,x),%eax; KERNCALL; \
+ jb HIDENAME(cerror); ret; \
END(__CONCAT(__sys_,x))
#define PSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \
.weak CNAME(__CONCAT(_,x)); \
.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
- mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret ; \
- 2: movq PIC_GOT(HIDENAME(cerror)),%rcx; jmp *%rcx; \
+ mov __CONCAT($SYS_,x),%eax; KERNCALL; \
+ jb HIDENAME(cerror); ret; \
END(__CONCAT(__sys_,x))
-#else
-#define RSYSCALL(x) ENTRY(__CONCAT(__sys_,x)); \
- .weak CNAME(x); \
- .set CNAME(x),CNAME(__CONCAT(__sys_,x)); \
- .weak CNAME(__CONCAT(_,x)); \
- .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
- mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret; \
- 2: jmp HIDENAME(cerror); \
- END(__CONCAT(__sys_,x))
-
-#define PSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \
- .weak CNAME(__CONCAT(_,x)); \
- .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
- mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret; \
- 2: jmp HIDENAME(cerror); \
- END(__CONCAT(__sys_,x))
-#endif
#define KERNCALL movq %rcx, %r10; syscall
diff --git a/lib/libc/amd64/Symbol.map b/lib/libc/amd64/Symbol.map
index 9997cc2..bbf6113 100644
--- a/lib/libc/amd64/Symbol.map
+++ b/lib/libc/amd64/Symbol.map
@@ -66,7 +66,6 @@ FBSDprivate_1.0 {
.curbrk;
.minbrk;
_brk;
- .cerror;
_end;
__sys_vfork;
_vfork;
diff --git a/lib/libc/amd64/gen/rfork_thread.S b/lib/libc/amd64/gen/rfork_thread.S
index 9720e08..5e764db 100644
--- a/lib/libc/amd64/gen/rfork_thread.S
+++ b/lib/libc/amd64/gen/rfork_thread.S
@@ -93,12 +93,7 @@ ENTRY(rfork_thread)
2:
popq %r12
popq %rbx
-#ifdef PIC
- movq PIC_GOT(HIDENAME(cerror)), %rdx
- jmp *%rdx
-#else
jmp HIDENAME(cerror)
-#endif
END(rfork_thread)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/amd64/sys/Makefile.inc b/lib/libc/amd64/sys/Makefile.inc
index c7b17e0..51583d3 100644
--- a/lib/libc/amd64/sys/Makefile.inc
+++ b/lib/libc/amd64/sys/Makefile.inc
@@ -1,7 +1,8 @@
# from: Makefile.inc,v 1.1 1993/09/03 19:04:23 jtc Exp
# $FreeBSD$
-SRCS+= amd64_get_fsbase.c amd64_get_gsbase.c amd64_set_fsbase.c amd64_set_gsbase.c
+SRCS+= amd64_get_fsbase.c amd64_get_gsbase.c amd64_set_fsbase.c \
+ amd64_set_gsbase.c __vdso_gettc.c
MDASM= vfork.S brk.S cerror.S exect.S getcontext.S pipe.S ptrace.S \
reboot.S sbrk.S setlogin.S sigreturn.S
diff --git a/lib/libc/amd64/sys/__vdso_gettc.c b/lib/libc/amd64/sys/__vdso_gettc.c
new file mode 100644
index 0000000..091fe26
--- /dev/null
+++ b/lib/libc/amd64/sys/__vdso_gettc.c
@@ -0,0 +1,49 @@
+/*-
+ * Copyright (c) 2012 Konstantin Belousov <kib@FreeBSD.org>
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/vdso.h>
+#include <machine/cpufunc.h>
+
+static u_int
+__vdso_gettc_low(const struct vdso_timehands *th)
+{
+ uint32_t rv;
+
+ __asm __volatile("rdtsc; shrd %%cl, %%edx, %0"
+ : "=a" (rv) : "c" (th->th_x86_shift) : "edx");
+ return (rv);
+}
+
+u_int
+__vdso_gettc(const struct vdso_timehands *th)
+{
+
+ return (th->th_x86_shift > 0 ? __vdso_gettc_low(th) : rdtsc32());
+}
diff --git a/lib/libc/amd64/sys/brk.S b/lib/libc/amd64/sys/brk.S
index 2319417..4048ae6 100644
--- a/lib/libc/amd64/sys/brk.S
+++ b/lib/libc/amd64/sys/brk.S
@@ -76,12 +76,7 @@ ok:
ret
err:
addq $8, %rsp
-#ifdef PIC
- movq PIC_GOT(HIDENAME(cerror)),%rdx
- jmp *%rdx
-#else
jmp HIDENAME(cerror)
-#endif
END(brk)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/amd64/sys/exect.S b/lib/libc/amd64/sys/exect.S
index 81dc8e5..04a97ed 100644
--- a/lib/libc/amd64/sys/exect.S
+++ b/lib/libc/amd64/sys/exect.S
@@ -47,12 +47,7 @@ ENTRY(exect)
pushq %r8
popfq
KERNCALL
-#ifdef PIC
- movq PIC_GOT(HIDENAME(cerror)),%rdx
- jmp *%rdx
-#else
jmp HIDENAME(cerror)
-#endif
END(exect)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/amd64/sys/getcontext.S b/lib/libc/amd64/sys/getcontext.S
index ea29adb..1128796 100644
--- a/lib/libc/amd64/sys/getcontext.S
+++ b/lib/libc/amd64/sys/getcontext.S
@@ -42,16 +42,9 @@ ENTRY(__sys_getcontext)
movq (%rsp),%rsi /* save getcontext return address */
mov $SYS_getcontext,%rax
KERNCALL
- jb 1f
+ jb HIDENAME(cerror)
addq $8,%rsp /* remove stale (setcontext) return address */
jmp *%rsi /* restore return address */
-1:
-#ifdef PIC
- movq PIC_GOT(HIDENAME(cerror)),%rdx
- jmp *%rdx
-#else
- jmp HIDENAME(cerror)
-#endif
END(__sys_getcontext)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/amd64/sys/pipe.S b/lib/libc/amd64/sys/pipe.S
index 59c1ac1c..8d089db 100644
--- a/lib/libc/amd64/sys/pipe.S
+++ b/lib/libc/amd64/sys/pipe.S
@@ -45,18 +45,11 @@ __FBSDID("$FreeBSD$");
ENTRY(__sys_pipe)
mov $SYS_pipe,%rax
KERNCALL
- jb 1f
+ jb HIDENAME(cerror)
movl %eax,(%rdi) /* %rdi is preserved by syscall */
movl %edx,4(%rdi)
movq $0,%rax
ret
-1:
-#ifdef PIC
- movq PIC_GOT(HIDENAME(cerror)),%rdx
- jmp *%rdx
-#else
- jmp HIDENAME(cerror)
-#endif
END(__sys_pipe)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/amd64/sys/ptrace.S b/lib/libc/amd64/sys/ptrace.S
index 6235390..9c4628d 100644
--- a/lib/libc/amd64/sys/ptrace.S
+++ b/lib/libc/amd64/sys/ptrace.S
@@ -48,15 +48,8 @@ ENTRY(ptrace)
#endif
mov $SYS_ptrace,%eax
KERNCALL
- jb err
+ jb HIDENAME(cerror)
ret
-err:
-#ifdef PIC
- movq PIC_GOT(HIDENAME(cerror)),%rdx
- jmp *%rdx
-#else
- jmp HIDENAME(cerror)
-#endif
END(ptrace)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/amd64/sys/reboot.S b/lib/libc/amd64/sys/reboot.S
index e79ca79..fd04ef4 100644
--- a/lib/libc/amd64/sys/reboot.S
+++ b/lib/libc/amd64/sys/reboot.S
@@ -45,15 +45,8 @@ __FBSDID("$FreeBSD$");
ENTRY(__sys_reboot)
mov $SYS_reboot,%rax
KERNCALL
- jb 1f
+ jb HIDENAME(cerror)
iretq
-1:
-#ifdef PIC
- movq PIC_GOT(HIDENAME(cerror)),%rdx
- jmp *%rdx
-#else
- jmp HIDENAME(cerror)
-#endif
END(__sys_reboot)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/amd64/sys/sbrk.S b/lib/libc/amd64/sys/sbrk.S
index 3e4d8aa..0332aae 100644
--- a/lib/libc/amd64/sys/sbrk.S
+++ b/lib/libc/amd64/sys/sbrk.S
@@ -79,12 +79,7 @@ back:
ret
err:
addq $8, %rsp
-#ifdef PIC
- movq PIC_GOT(HIDENAME(cerror)),%rdx
- jmp *%rdx
-#else
jmp HIDENAME(cerror)
-#endif
END(sbrk)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/amd64/sys/setlogin.S b/lib/libc/amd64/sys/setlogin.S
index 23692b9..a451491 100644
--- a/lib/libc/amd64/sys/setlogin.S
+++ b/lib/libc/amd64/sys/setlogin.S
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
ENTRY(__sys_setlogin)
mov $SYS_setlogin,%rax
KERNCALL
- jb 1f
+ jb HIDENAME(cerror)
#ifdef PIC
movq PIC_GOT(CNAME(_logname_valid)),%rdx
movl $0,(%rdx)
@@ -55,13 +55,6 @@ ENTRY(__sys_setlogin)
movl $0,CNAME(_logname_valid)(%rip)
#endif
ret /* setlogin(name) */
-1:
-#ifdef PIC
- movq PIC_GOT(HIDENAME(cerror)),%rdx
- jmp *%rdx
-#else
- jmp HIDENAME(cerror)
-#endif
END(__sys_setlogin)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/amd64/sys/vfork.S b/lib/libc/amd64/sys/vfork.S
index 555c3ca..2afba58 100644
--- a/lib/libc/amd64/sys/vfork.S
+++ b/lib/libc/amd64/sys/vfork.S
@@ -50,12 +50,7 @@ ENTRY(__sys_vfork)
jmp *%rsi
1:
pushq %rsi
-#ifdef PIC
- movq PIC_GOT(HIDENAME(cerror)),%rdx
- jmp *%rdx
-#else
jmp HIDENAME(cerror)
-#endif
END(__sys_vfork)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map
index dc46013..48f6747 100644
--- a/lib/libc/arm/Symbol.map
+++ b/lib/libc/arm/Symbol.map
@@ -33,6 +33,10 @@ FBSD_1.0 {
sbrk;
};
+FBSD_1.3 {
+ __flt_rounds;
+};
+
FBSDprivate_1.0 {
/* PSEUDO syscalls */
__sys_getlogin;
diff --git a/lib/libc/arm/gen/__aeabi_read_tp.S b/lib/libc/arm/gen/__aeabi_read_tp.S
index 228acff..c3ea99d 100644
--- a/lib/libc/arm/gen/__aeabi_read_tp.S
+++ b/lib/libc/arm/gen/__aeabi_read_tp.S
@@ -31,10 +31,16 @@ __FBSDID("$FreeBSD$");
#include <machine/sysarch.h>
ENTRY(__aeabi_read_tp)
+#ifdef ARM_TP_ADDRESS
ldr r0, .Larm_tp_address
ldr r0, [r0]
+#else
+ mrc p15, 0, r0, c13, c0, 3
+#endif
RET
+#ifdef ARM_TP_ADDRESS
.Larm_tp_address:
.word ARM_TP_ADDRESS
+#endif
diff --git a/lib/libc/arm/gen/_set_tp.c b/lib/libc/arm/gen/_set_tp.c
index 44bbdd8..97cabec 100644
--- a/lib/libc/arm/gen/_set_tp.c
+++ b/lib/libc/arm/gen/_set_tp.c
@@ -35,5 +35,9 @@ void
_set_tp(void *tp)
{
+#ifdef ARM_TP_ADDRESS
*((struct tcb **)ARM_TP_ADDRESS) = tp;
+#else
+ sysarch(ARM_SET_TP, tp);
+#endif
}
diff --git a/lib/libc/compat-43/killpg.2 b/lib/libc/compat-43/killpg.2
index b23b773..a1d52a4 100644
--- a/lib/libc/compat-43/killpg.2
+++ b/lib/libc/compat-43/killpg.2
@@ -58,11 +58,9 @@ is 0,
.Fn killpg
sends the signal to the sending process's process group.
.Pp
-The sending process and members of the process group must
-have the same effective user ID, or
-the sender must be the super-user.
-As a single special case the continue signal SIGCONT may be sent
-to any process with the same session ID as the caller.
+The sending process must be able to
+.Fn kill
+at least one process in the receiving process group.
.Sh RETURN VALUES
.Rv -std killpg
.Sh ERRORS
@@ -80,9 +78,8 @@ is not a valid signal number.
No process can be found in the process group specified by
.Fa pgrp .
.It Bq Er EPERM
-The sending process is not the super-user and one or more
-of the target processes has an effective user ID different from that
-of the sending process.
+.Fn kill
+returns EPERM for all processes in the process group.
.El
.Sh SEE ALSO
.Xr getpgrp 2 ,
diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc
index 98e8183..2481f28 100644
--- a/lib/libc/gen/Makefile.inc
+++ b/lib/libc/gen/Makefile.inc
@@ -7,8 +7,8 @@
SRCS+= __getosreldate.c __xuname.c \
_once_stub.c _pthread_stubs.c _rand48.c _spinlock_stub.c \
_thread_init.c \
- alarm.c arc4random.c assert.c aux.c basename.c check_utility_compat.c \
- clock.c closedir.c confstr.c \
+ alarm.c arc4random.c assert.c auxv.c basename.c check_utility_compat.c \
+ clock.c clock_getcpuclockid.c closedir.c confstr.c \
crypt.c ctermid.c daemon.c devname.c dirfd.c dirname.c disklabel.c \
dlfcn.c drand48.c elf_utils.c erand48.c err.c errlst.c errno.c \
exec.c fdevname.c feature_present.c fmtcheck.c fmtmsg.c fnmatch.c \
@@ -24,7 +24,7 @@ SRCS+= __getosreldate.c __xuname.c \
lockf.c lrand48.c mrand48.c nftw.c nice.c \
nlist.c nrand48.c opendir.c \
pause.c pmadvise.c popen.c posix_spawn.c \
- psignal.c pututxline.c pw_scan.c pwcache.c \
+ psignal.c pututxline.c pw_scan.c \
raise.c readdir.c readpassphrase.c rewinddir.c \
scandir.c seed48.c seekdir.c semctl.c \
setdomainname.c sethostname.c setjmperr.c setmode.c \
@@ -36,6 +36,9 @@ SRCS+= __getosreldate.c __xuname.c \
usleep.c utime.c utxdb.c valloc.c vis.c wait.c wait3.c waitpid.c \
wordexp.c
+.PATH: ${.CURDIR}/../../contrib/libc-pwcache
+SRCS+= pwcache.c pwcache.h
+
MISRCS+=modf.c
CANCELPOINTS_SRCS=sem.c sem_new.c
@@ -52,7 +55,7 @@ SYM_MAPS+=${.CURDIR}/gen/Symbol.map
.sinclude "${.CURDIR}/${LIBC_ARCH}/gen/Makefile.inc"
MAN+= alarm.3 arc4random.3 \
- basename.3 check_utility_compat.3 clock.3 \
+ basename.3 check_utility_compat.3 clock.3 clock_getcpuclockid.3 \
confstr.3 ctermid.3 daemon.3 devname.3 directory.3 dirname.3 \
dl_iterate_phdr.3 dladdr.3 dlinfo.3 dllockinit.3 dlopen.3 \
err.3 exec.3 \
diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map
index 356bee5..b4f88ae 100644
--- a/lib/libc/gen/Symbol.map
+++ b/lib/libc/gen/Symbol.map
@@ -382,10 +382,15 @@ FBSD_1.2 {
};
FBSD_1.3 {
+ clock_getcpuclockid;
dirfd;
fdlopen;
__FreeBSD_libc_enter_restricted_mode;
getcontextx;
+ gid_from_group;
+ pwcache_userdb;
+ pwcache_groupdb;
+ uid_from_user;
};
FBSDprivate_1.0 {
diff --git a/lib/libc/gen/arc4random.c b/lib/libc/gen/arc4random.c
index a2b235f..59e410b 100644
--- a/lib/libc/gen/arc4random.c
+++ b/lib/libc/gen/arc4random.c
@@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
#include <unistd.h>
#include <sys/types.h>
#include <sys/param.h>
+#include <sys/sysctl.h>
#include <sys/time.h>
#include <pthread.h>
@@ -78,6 +79,9 @@ static struct arc4_stream rs;
static pid_t arc4_stir_pid;
static int arc4_count;
+extern int __sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp,
+ void *newp, size_t newlen);
+
static inline u_int8_t arc4_getbyte(void);
static void arc4_stir(void);
@@ -109,6 +113,28 @@ arc4_addrandom(u_char *dat, int datlen)
rs.j = rs.i;
}
+static size_t
+arc4_sysctl(u_char *buf, size_t size)
+{
+ int mib[2];
+ size_t len, done;
+
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_ARND;
+ done = 0;
+
+ do {
+ len = size;
+ if (__sysctl(mib, 2, buf, &len, NULL, 0) == -1)
+ return (done);
+ done += len;
+ buf += len;
+ size -= len;
+ } while (size > 0);
+
+ return (done);
+}
+
static void
arc4_stir(void)
{
@@ -123,12 +149,16 @@ arc4_stir(void)
arc4_init();
rs_initialized = 1;
}
- fd = _open(RANDOMDEV, O_RDONLY, 0);
done = 0;
- if (fd >= 0) {
- if (_read(fd, &rdat, KEYSIZE) == KEYSIZE)
- done = 1;
- (void)_close(fd);
+ if (arc4_sysctl((u_char *)&rdat, KEYSIZE) == KEYSIZE)
+ done = 1;
+ if (!done) {
+ fd = _open(RANDOMDEV, O_RDONLY | O_CLOEXEC, 0);
+ if (fd >= 0) {
+ if (_read(fd, &rdat, KEYSIZE) == KEYSIZE)
+ done = 1;
+ (void)_close(fd);
+ }
}
if (!done) {
(void)gettimeofday(&rdat.tv, NULL);
diff --git a/lib/libc/gen/aux.c b/lib/libc/gen/auxv.c
index 4bf8643..3767ac0 100644
--- a/lib/libc/gen/aux.c
+++ b/lib/libc/gen/auxv.c
@@ -66,6 +66,7 @@ __init_elf_aux_vector(void)
static pthread_once_t aux_once = PTHREAD_ONCE_INIT;
static int pagesize, osreldate, canary_len, ncpus, pagesizes_len;
static char *canary, *pagesizes;
+static void *timekeep;
static void
init_aux(void)
@@ -101,6 +102,10 @@ init_aux(void)
case AT_NCPUS:
ncpus = aux->a_un.a_val;
break;
+
+ case AT_TIMEKEEP:
+ timekeep = aux->a_un.a_ptr;
+ break;
}
}
}
@@ -163,6 +168,16 @@ _elf_aux_info(int aux, void *buf, int buflen)
} else
res = EINVAL;
break;
+ case AT_TIMEKEEP:
+ if (buflen == sizeof(void *)) {
+ if (timekeep != NULL) {
+ *(void **)buf = timekeep;
+ res = 0;
+ } else
+ res = ENOENT;
+ } else
+ res = EINVAL;
+ break;
default:
res = ENOENT;
break;
diff --git a/lib/libc/gen/clock_getcpuclockid.3 b/lib/libc/gen/clock_getcpuclockid.3
new file mode 100644
index 0000000..3d31993
--- /dev/null
+++ b/lib/libc/gen/clock_getcpuclockid.3
@@ -0,0 +1,95 @@
+.\" Copyright (c) 2012 David Xu <davidxu@FreeBSD.org>
+.\" 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.
+.\"
+.\" Portions of this text are reprinted and reproduced in electronic form
+.\" from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology --
+.\" Portable Operating System Interface (POSIX), The Open Group Base
+.\" Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of
+.\" Electrical and Electronics Engineers, Inc and The Open Group. In the
+.\" event of any discrepancy between this version and the original IEEE and
+.\" The Open Group Standard, the original IEEE and The Open Group Standard is
+.\" the referee document. The original Standard can be obtained online at
+.\" http://www.opengroup.org/unix/online.html.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 21, 2012
+.Dt CLOCK_GETCPUCLOCKID 3
+.Os
+.Sh NAME
+.Nm clock_getcpuclockid
+.Nd access a process CPU-time clock
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In time.h
+.Ft int
+.Fn clock_getcpuclockid "pid_t pid" "clockid_t *clock_id"
+.Sh DESCRIPTION
+The
+.Fn clock_getcpuclockid
+returns the clock ID of the CPU-time clock of the process specified by
+.Fa pid .
+If the process described by
+.Fa pid
+exists and the calling process has permission, the clock ID of this
+clock will be returned in
+.Fa clock_id .
+.Pp
+If
+.Fa pid
+is zero, the
+.Fn clock_getcpuclockid
+function returns the clock ID of the CPU-time clock of the process
+making the call, in
+.Fa clock_id .
+.Sh RETURN VALUES
+Upon successful completion,
+.Fn clock_getcpuclockid
+returns zero; otherwise, an error number is returned to indicate the
+error.
+.Sh ERRORS
+The clock_getcpuclockid() function will fail if:
+.Bl -tag -width Er
+.It Bq Er EPERM
+The requesting process does not have permission to access the CPU-time
+clock for the process.
+.It Bq Er ESRCH
+No process can be found corresponding to the process specified by
+.Fa pid .
+.El
+.Sh SEE ALSO
+.Xr clock_gettime 2
+.Sh STANDARDS
+The
+.Fn clock_getcpuclockid
+function conform to
+.St -p1003.1-2001 .
+.Sh HISTORY
+The
+.Fn clock_getcpuclockid
+function first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+.An David Xu Aq davidxu@FreeBSD.org
diff --git a/lib/libc/gen/clock_getcpuclockid.c b/lib/libc/gen/clock_getcpuclockid.c
new file mode 100644
index 0000000..f26035f
--- /dev/null
+++ b/lib/libc/gen/clock_getcpuclockid.c
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2012 David Xu <davidxu@FreeBSD.org>.
+ * 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 DANIEL EISCHEN 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <errno.h>
+#include <time.h>
+#include <unistd.h>
+#include <sys/time.h>
+
+int
+clock_getcpuclockid(pid_t pid, clockid_t *clock_id)
+{
+ if (clock_getcpuclockid2(pid, CPUCLOCK_WHICH_PID, clock_id))
+ return (errno);
+ return (0);
+}
diff --git a/lib/libc/gen/directory.3 b/lib/libc/gen/directory.3
index 1c568fc..0fd5bba 100644
--- a/lib/libc/gen/directory.3
+++ b/lib/libc/gen/directory.3
@@ -28,7 +28,7 @@
.\" @(#)directory.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd April 16, 2008
+.Dd July 5, 2012
.Dt DIRECTORY 3
.Os
.Sh NAME
@@ -153,7 +153,7 @@ returns 0 on success or an error number to indicate failure.
The
.Fn telldir
function
-returns the current location associated with the named
+returns a token representing the current location associated with the named
.Em directory stream .
Values returned by
.Fn telldir
@@ -179,6 +179,13 @@ The new position reverts to the one associated with the
when the
.Fn telldir
operation was performed.
+State associated with the token returned by
+.Fn telldir is freed when it is passed to
+.Fn seekdir .
+If you wish return to the same location again,
+then you must create a new token with another
+.Fn telldir
+call.
.Pp
The
.Fn rewinddir
@@ -245,3 +252,9 @@ The
.Fn fdopendir
function appeared in
.Fx 8.0 .
+.Sh BUGS
+The invalidation of
+.Fn telldir
+tokens when calling
+.Fn seekdir
+is non-standard.
diff --git a/lib/libc/gen/fstab.c b/lib/libc/gen/fstab.c
index b2c28ad..b68db2e 100644
--- a/lib/libc/gen/fstab.c
+++ b/lib/libc/gen/fstab.c
@@ -39,12 +39,14 @@ __FBSDID("$FreeBSD$");
#include <sys/stat.h>
#include <errno.h>
+#include <fcntl.h>
#include <fstab.h>
#include <paths.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <vis.h>
#include "un-namespace.h"
static FILE *_fs_fp;
@@ -75,7 +77,7 @@ setfstab(const char *file)
}
const char *
-getfstab (void)
+getfstab(void)
{
if (fsp_set)
@@ -85,7 +87,7 @@ getfstab (void)
}
static void
-fixfsfile()
+fixfsfile(void)
{
static char buf[sizeof(_PATH_DEV) + MNAMELEN];
struct stat sb;
@@ -107,7 +109,7 @@ fixfsfile()
}
static int
-fstabscan()
+fstabscan(void)
{
char *cp, *p;
#define MAXLINELENGTH 1024
@@ -118,7 +120,7 @@ fstabscan()
for (;;) {
if (!(p = fgets(line, sizeof(line), _fs_fp)))
- return(0);
+ return (0);
/* OLD_STYLE_FSTAB */
++LineNo;
if (*line == '#' || *line == '\n')
@@ -139,7 +141,7 @@ fstabscan()
_fs_fstab.fs_freq = atoi(cp);
if ((cp = strsep(&p, ":\n")) != NULL) {
_fs_fstab.fs_passno = atoi(cp);
- return(1);
+ return (1);
}
}
}
@@ -149,11 +151,17 @@ fstabscan()
while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0')
;
_fs_fstab.fs_spec = cp;
- if (!_fs_fstab.fs_spec || *_fs_fstab.fs_spec == '#')
+ if (_fs_fstab.fs_spec == NULL || *_fs_fstab.fs_spec == '#')
continue;
+ if (strunvis(_fs_fstab.fs_spec, _fs_fstab.fs_spec) < 0)
+ goto bad;
while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0')
;
_fs_fstab.fs_file = cp;
+ if (_fs_fstab.fs_file == NULL)
+ goto bad;
+ if (strunvis(_fs_fstab.fs_file, _fs_fstab.fs_file) < 0)
+ goto bad;
fixfsfile();
while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0')
;
@@ -205,7 +213,7 @@ fstabscan()
if (typexx)
continue;
if (cp != NULL)
- return(1);
+ return (1);
bad: /* no way to distinguish between EOF and syntax error */
error(EFTYPE);
@@ -214,42 +222,45 @@ bad: /* no way to distinguish between EOF and syntax error */
}
struct fstab *
-getfsent()
+getfsent(void)
{
+
if ((!_fs_fp && !setfsent()) || !fstabscan())
- return((struct fstab *)NULL);
- return(&_fs_fstab);
+ return (NULL);
+ return (&_fs_fstab);
}
struct fstab *
-getfsspec(name)
- const char *name;
+getfsspec(const char *name)
{
+
if (setfsent())
while (fstabscan())
if (!strcmp(_fs_fstab.fs_spec, name))
- return(&_fs_fstab);
- return((struct fstab *)NULL);
+ return (&_fs_fstab);
+ return (NULL);
}
struct fstab *
-getfsfile(name)
- const char *name;
+getfsfile(const char *name)
{
+
if (setfsent())
while (fstabscan())
if (!strcmp(_fs_fstab.fs_file, name))
- return(&_fs_fstab);
- return((struct fstab *)NULL);
+ return (&_fs_fstab);
+ return (NULL);
}
-int
-setfsent()
+int
+setfsent(void)
{
+ int fd;
+
if (_fs_fp) {
rewind(_fs_fp);
LineNo = 0;
- return(1);
+ return (1);
}
if (fsp_set == 0) {
if (issetugid())
@@ -257,17 +268,25 @@ setfsent()
else
setfstab(getenv("PATH_FSTAB"));
}
- if ((_fs_fp = fopen(path_fstab, "r")) != NULL) {
+ fd = _open(path_fstab, O_RDONLY | O_CLOEXEC);
+ if (fd == -1) {
+ error(errno);
+ return (0);
+ }
+ _fs_fp = fdopen(fd, "r");
+ if (_fs_fp != NULL) {
LineNo = 0;
- return(1);
+ return (1);
}
error(errno);
- return(0);
+ _close(fd);
+ return (0);
}
void
-endfsent()
+endfsent(void)
{
+
if (_fs_fp) {
(void)fclose(_fs_fp);
_fs_fp = NULL;
@@ -277,8 +296,7 @@ endfsent()
}
static void
-error(err)
- int err;
+error(int err)
{
char *p;
char num[30];
diff --git a/lib/libc/gen/fts-compat.c b/lib/libc/gen/fts-compat.c
index 6585416..1be41da 100644
--- a/lib/libc/gen/fts-compat.c
+++ b/lib/libc/gen/fts-compat.c
@@ -220,7 +220,8 @@ __fts_open_44bsd(argv, options, compar)
* and ".." are all fairly nasty problems. Note, if we can't get the
* descriptor we run anyway, just more slowly.
*/
- if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = _open(".", O_RDONLY, 0)) < 0)
+ if (!ISSET(FTS_NOCHDIR) &&
+ (sp->fts_rfd = _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0)
SET(FTS_NOCHDIR);
return (sp);
@@ -349,7 +350,8 @@ __fts_read_44bsd(sp)
(p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
p->fts_info = fts_stat(sp, p, 1);
if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
- if ((p->fts_symfd = _open(".", O_RDONLY, 0)) < 0) {
+ if ((p->fts_symfd = _open(".", O_RDONLY | O_CLOEXEC,
+ 0)) < 0) {
p->fts_errno = errno;
p->fts_info = FTS_ERR;
} else
@@ -440,7 +442,7 @@ next: tmp = p;
p->fts_info = fts_stat(sp, p, 1);
if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
if ((p->fts_symfd =
- _open(".", O_RDONLY, 0)) < 0) {
+ _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0) {
p->fts_errno = errno;
p->fts_info = FTS_ERR;
} else
@@ -581,7 +583,7 @@ __fts_children_44bsd(sp, instr)
ISSET(FTS_NOCHDIR))
return (sp->fts_child = fts_build(sp, instr));
- if ((fd = _open(".", O_RDONLY, 0)) < 0)
+ if ((fd = _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0)
return (NULL);
sp->fts_child = fts_build(sp, instr);
if (fchdir(fd))
@@ -1180,7 +1182,7 @@ fts_safe_changedir(sp, p, fd, path)
newfd = fd;
if (ISSET(FTS_NOCHDIR))
return (0);
- if (fd < 0 && (newfd = _open(path, O_RDONLY, 0)) < 0)
+ if (fd < 0 && (newfd = _open(path, O_RDONLY | O_CLOEXEC, 0)) < 0)
return (-1);
if (_fstat(newfd, &sb)) {
ret = -1;
diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c
index 153b8da..243320c 100644
--- a/lib/libc/gen/fts.c
+++ b/lib/libc/gen/fts.c
@@ -134,9 +134,8 @@ fts_open(argv, options, compar)
}
/* Allocate/initialize the stream. */
- if ((priv = malloc(sizeof(*priv))) == NULL)
+ if ((priv = calloc(1, sizeof(*priv))) == NULL)
return (NULL);
- memset(priv, 0, sizeof(*priv));
sp = &priv->ftsp_fts;
sp->fts_compar = compar;
sp->fts_options = options;
@@ -215,7 +214,8 @@ fts_open(argv, options, compar)
* and ".." are all fairly nasty problems. Note, if we can't get the
* descriptor we run anyway, just more slowly.
*/
- if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = _open(".", O_RDONLY, 0)) < 0)
+ if (!ISSET(FTS_NOCHDIR) &&
+ (sp->fts_rfd = _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0)
SET(FTS_NOCHDIR);
return (sp);
@@ -340,7 +340,8 @@ fts_read(FTS *sp)
(p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
p->fts_info = fts_stat(sp, p, 1);
if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
- if ((p->fts_symfd = _open(".", O_RDONLY, 0)) < 0) {
+ if ((p->fts_symfd = _open(".", O_RDONLY | O_CLOEXEC,
+ 0)) < 0) {
p->fts_errno = errno;
p->fts_info = FTS_ERR;
} else
@@ -431,7 +432,7 @@ next: tmp = p;
p->fts_info = fts_stat(sp, p, 1);
if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
if ((p->fts_symfd =
- _open(".", O_RDONLY, 0)) < 0) {
+ _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0) {
p->fts_errno = errno;
p->fts_info = FTS_ERR;
} else
@@ -567,7 +568,7 @@ fts_children(FTS *sp, int instr)
ISSET(FTS_NOCHDIR))
return (sp->fts_child = fts_build(sp, instr));
- if ((fd = _open(".", O_RDONLY, 0)) < 0)
+ if ((fd = _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0)
return (NULL);
sp->fts_child = fts_build(sp, instr);
if (fchdir(fd)) {
@@ -1118,7 +1119,7 @@ fts_safe_changedir(FTS *sp, FTSENT *p, int fd, char *path)
newfd = fd;
if (ISSET(FTS_NOCHDIR))
return (0);
- if (fd < 0 && (newfd = _open(path, O_RDONLY, 0)) < 0)
+ if (fd < 0 && (newfd = _open(path, O_RDONLY | O_CLOEXEC, 0)) < 0)
return (-1);
if (_fstat(newfd, &sb)) {
ret = -1;
diff --git a/lib/libc/gen/ftw.c b/lib/libc/gen/ftw.c
index bfaf121..253a295 100644
--- a/lib/libc/gen/ftw.c
+++ b/lib/libc/gen/ftw.c
@@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$");
#include <errno.h>
#include <fts.h>
#include <ftw.h>
-#include <limits.h>
int
ftw(const char *path, int (*fn)(const char *, const struct stat *, int),
@@ -40,7 +39,7 @@ ftw(const char *path, int (*fn)(const char *, const struct stat *, int),
int error = 0, fnflag, sverrno;
/* XXX - nfds is currently unused */
- if (nfds < 1 || nfds > OPEN_MAX) {
+ if (nfds < 1) {
errno = EINVAL;
return (-1);
}
diff --git a/lib/libc/gen/getcap.c b/lib/libc/gen/getcap.c
index 2700d3d..c321d12 100644
--- a/lib/libc/gen/getcap.c
+++ b/lib/libc/gen/getcap.c
@@ -264,7 +264,7 @@ getent(char **cap, u_int *len, char **db_array, int fd, const char *name,
*cap = cbuf;
return (retval);
} else {
- fd = _open(*db_p, O_RDONLY, 0);
+ fd = _open(*db_p, O_RDONLY | O_CLOEXEC, 0);
if (fd < 0)
continue;
myfd = 1;
diff --git a/lib/libc/gen/getcwd.c b/lib/libc/gen/getcwd.c
index 40feedf..da76d56 100644
--- a/lib/libc/gen/getcwd.c
+++ b/lib/libc/gen/getcwd.c
@@ -142,7 +142,7 @@ getcwd(pt, size)
/* Open and stat parent directory. */
fd = _openat(dir != NULL ? _dirfd(dir) : AT_FDCWD,
- "..", O_RDONLY);
+ "..", O_RDONLY | O_CLOEXEC);
if (fd == -1)
goto err;
if (dir)
diff --git a/lib/libc/gen/getnetgrent.c b/lib/libc/gen/getnetgrent.c
index 933a7d3..51b3e37 100644
--- a/lib/libc/gen/getnetgrent.c
+++ b/lib/libc/gen/getnetgrent.c
@@ -161,8 +161,7 @@ setnetgrent(const char *group)
if (group == NULL || !strlen(group))
return;
- if (grouphead.gr == (struct netgrp *)0 ||
- strcmp(group, grouphead.grname)) {
+ if (grouphead.gr == NULL || strcmp(group, grouphead.grname)) {
endnetgrent();
#ifdef YP
/* Presumed guilty until proven innocent. */
@@ -172,7 +171,7 @@ setnetgrent(const char *group)
* use NIS exclusively.
*/
if (((stat(_PATH_NETGROUP, &_yp_statp) < 0) &&
- errno == ENOENT) || _yp_statp.st_size == 0)
+ errno == ENOENT) || _yp_statp.st_size == 0)
_use_only_yp = _netgr_yp_enabled = 1;
if ((netf = fopen(_PATH_NETGROUP,"r")) != NULL ||_use_only_yp){
/*
@@ -247,27 +246,24 @@ endnetgrent(void)
lp = lp->l_next;
free(olp->l_groupname);
free(olp->l_line);
- free((char *)olp);
+ free(olp);
}
- linehead = (struct linelist *)0;
+ linehead = NULL;
if (grouphead.grname) {
free(grouphead.grname);
- grouphead.grname = (char *)0;
+ grouphead.grname = NULL;
}
gp = grouphead.gr;
while (gp) {
ogp = gp;
gp = gp->ng_next;
- if (ogp->ng_str[NG_HOST])
- free(ogp->ng_str[NG_HOST]);
- if (ogp->ng_str[NG_USER])
- free(ogp->ng_str[NG_USER]);
- if (ogp->ng_str[NG_DOM])
- free(ogp->ng_str[NG_DOM]);
- free((char *)ogp);
+ free(ogp->ng_str[NG_HOST]);
+ free(ogp->ng_str[NG_USER]);
+ free(ogp->ng_str[NG_DOM]);
+ free(ogp);
}
- grouphead.gr = (struct netgrp *)0;
- nextgrp = (struct netgrp *)0;
+ grouphead.gr = NULL;
+ nextgrp = NULL;
#ifdef YP
_netgr_yp_enabled = 0;
#endif
@@ -282,7 +278,7 @@ _listmatch(const char *list, const char *group, int len)
int glen = strlen(group);
/* skip possible leading whitespace */
- while(isspace((unsigned char)*ptr))
+ while (isspace((unsigned char)*ptr))
ptr++;
while (ptr < list + len) {
@@ -291,7 +287,7 @@ _listmatch(const char *list, const char *group, int len)
ptr++;
if (strncmp(cptr, group, glen) == 0 && glen == (ptr - cptr))
return (1);
- while(*ptr == ',' || isspace((unsigned char)*ptr))
+ while (*ptr == ',' || isspace((unsigned char)*ptr))
ptr++;
}
@@ -436,8 +432,7 @@ parse_netgrp(const char *group)
break;
lp = lp->l_next;
}
- if (lp == (struct linelist *)0 &&
- (lp = read_for_group(group)) == (struct linelist *)0)
+ if (lp == NULL && (lp = read_for_group(group)) == NULL)
return (1);
if (lp->l_parsed) {
#ifdef DEBUG
@@ -538,7 +533,7 @@ parse_netgrp(const char *group)
static struct linelist *
read_for_group(const char *group)
{
- char *pos, *spos, *linep;
+ char *linep, *olinep, *pos, *spos;
int len, olen;
int cont;
struct linelist *lp;
@@ -615,15 +610,20 @@ read_for_group(const char *group)
} else
cont = 0;
if (len > 0) {
- linep = reallocf(linep, olen + len + 1);
+ linep = malloc(olen + len + 1);
if (linep == NULL) {
free(lp->l_groupname);
free(lp);
return (NULL);
}
+ if (olen > 0) {
+ bcopy(olinep, linep, olen);
+ free(olinep);
+ }
bcopy(pos, linep + olen, len);
olen += len;
*(linep + olen) = '\0';
+ olinep = linep;
}
if (cont) {
if (fgets(line, LINSIZ, netf)) {
diff --git a/lib/libc/gen/nftw.c b/lib/libc/gen/nftw.c
index 43110c1..a338e5a 100644
--- a/lib/libc/gen/nftw.c
+++ b/lib/libc/gen/nftw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nftw.c,v 1.4 2004/07/07 16:05:23 millert Exp $ */
+/* $OpenBSD: nftw.c,v 1.7 2006/03/31 19:41:44 millert Exp $ */
/*
* Copyright (c) 2003, 2004 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -20,12 +20,6 @@
* Materiel Command, USAF, under agreement number F39502-99-1-0512.
*/
-#if 0
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$OpenBSD: nftw.c,v 1.4 2004/07/07 16:05:23 millert Exp $";
-#endif /* LIBC_SCCS and not lint */
-#endif
-
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -34,7 +28,6 @@ __FBSDID("$FreeBSD$");
#include <errno.h>
#include <fts.h>
#include <ftw.h>
-#include <limits.h>
int
nftw(const char *path, int (*fn)(const char *, const struct stat *, int,
@@ -47,7 +40,7 @@ nftw(const char *path, int (*fn)(const char *, const struct stat *, int,
int error = 0, ftsflags, fnflag, postorder, sverrno;
/* XXX - nfds is currently unused */
- if (nfds < 1 || nfds > OPEN_MAX) {
+ if (nfds < 1) {
errno = EINVAL;
return (-1);
}
@@ -72,6 +65,8 @@ nftw(const char *path, int (*fn)(const char *, const struct stat *, int,
continue;
fnflag = FTW_D;
break;
+ case FTS_DC:
+ continue;
case FTS_DNR:
fnflag = FTW_DNR;
break;
@@ -94,9 +89,6 @@ nftw(const char *path, int (*fn)(const char *, const struct stat *, int,
case FTS_SLNONE:
fnflag = FTW_SLN;
break;
- case FTS_DC:
- errno = ELOOP;
- /* FALLTHROUGH */
default:
error = -1;
goto done;
diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c
index 1361af3..159731c 100644
--- a/lib/libc/gen/nlist.c
+++ b/lib/libc/gen/nlist.c
@@ -66,7 +66,7 @@ nlist(name, list)
{
int fd, n;
- fd = _open(name, O_RDONLY, 0);
+ fd = _open(name, O_RDONLY | O_CLOEXEC, 0);
if (fd < 0)
return (-1);
n = __fdnlist(fd, list);
diff --git a/lib/libc/gen/opendir.c b/lib/libc/gen/opendir.c
index 4366399..2d505fc 100644
--- a/lib/libc/gen/opendir.c
+++ b/lib/libc/gen/opendir.c
@@ -199,7 +199,8 @@ __opendir_common(int fd, const char *name, int flags)
* which has also been read -- see fts.c.
*/
if (flags & DTF_REWIND) {
- if ((fd2 = _open(name, O_RDONLY | O_DIRECTORY)) == -1) {
+ if ((fd2 = _open(name, O_RDONLY | O_DIRECTORY |
+ O_CLOEXEC)) == -1) {
saved_errno = errno;
free(buf);
free(dirp);
diff --git a/lib/libc/gen/pututxline.c b/lib/libc/gen/pututxline.c
index 98addee..555386c 100644
--- a/lib/libc/gen/pututxline.c
+++ b/lib/libc/gen/pututxline.c
@@ -47,7 +47,7 @@ futx_open(const char *file)
struct stat sb;
int fd;
- fd = _open(file, O_CREAT|O_RDWR|O_EXLOCK, 0644);
+ fd = _open(file, O_CREAT|O_RDWR|O_EXLOCK|O_CLOEXEC, 0644);
if (fd < 0)
return (NULL);
@@ -235,7 +235,7 @@ utx_lastlogin_upgrade(void)
struct stat sb;
int fd;
- fd = _open(_PATH_UTX_LASTLOGIN, O_RDWR, 0644);
+ fd = _open(_PATH_UTX_LASTLOGIN, O_RDWR|O_CLOEXEC, 0644);
if (fd < 0)
return;
@@ -269,7 +269,7 @@ utx_log_add(const struct futx *fu)
vec[1].iov_len = l;
l = htobe16(l);
- fd = _open(_PATH_UTX_LOG, O_CREAT|O_WRONLY|O_APPEND, 0644);
+ fd = _open(_PATH_UTX_LOG, O_CREAT|O_WRONLY|O_APPEND|O_CLOEXEC, 0644);
if (fd < 0)
return (-1);
if (_writev(fd, vec, 2) == -1)
diff --git a/lib/libc/gen/pwcache.3 b/lib/libc/gen/pwcache.3
deleted file mode 100644
index 3910082..0000000
--- a/lib/libc/gen/pwcache.3
+++ /dev/null
@@ -1,93 +0,0 @@
-.\" Copyright (c) 1989, 1991, 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.
-.\" 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.
-.\"
-.\" @(#)pwcache.3 8.1 (Berkeley) 6/9/93
-.\" $FreeBSD$
-.\"
-.Dd March 22, 2002
-.Dt PWCACHE 3
-.Os
-.Sh NAME
-.Nm pwcache
-.Nd cache password and group entries
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In pwd.h
-.Ft const char *
-.Fn user_from_uid "uid_t uid" "int nouser"
-.In grp.h
-.Ft const char *
-.Fn group_from_gid "gid_t gid" "int nogroup"
-.Sh DESCRIPTION
-The
-.Fn user_from_uid
-function returns the user name associated with the argument
-.Fa uid .
-The user name is cached so that multiple calls with the same
-.Fa uid
-do not require additional calls to
-.Xr getpwuid 3 .
-If there is no user associated with the
-.Fa uid ,
-a pointer is returned
-to a string representation of the
-.Fa uid ,
-unless the argument
-.Fa nouser
-is non-zero, in which case a
-.Dv NULL
-pointer is returned.
-.Pp
-The
-.Fn group_from_gid
-function returns the group name associated with the argument
-.Fa gid .
-The group name is cached so that multiple calls with the same
-.Fa gid
-do not require additional calls to
-.Xr getgrgid 3 .
-If there is no group associated with the
-.Fa gid ,
-a pointer is returned
-to a string representation of the
-.Fa gid ,
-unless the argument
-.Fa nogroup
-is non-zero, in which case a
-.Dv NULL
-pointer is returned.
-.Sh SEE ALSO
-.Xr getgrgid 3 ,
-.Xr getpwuid 3
-.Sh HISTORY
-The
-.Fn user_from_uid
-and
-.Fn group_from_gid
-functions first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/gen/pwcache.c b/lib/libc/gen/pwcache.c
deleted file mode 100644
index a8a73f1..0000000
--- a/lib/libc/gen/pwcache.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 1989, 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.
- * 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.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)pwcache.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/param.h>
-#include <sys/types.h>
-
-#include <grp.h>
-#include <pwd.h>
-#include <stdio.h>
-#include <string.h>
-
-#define NCACHE 64 /* power of 2 */
-#define MASK (NCACHE - 1) /* bits to store with */
-
-const char *
-user_from_uid(uid_t uid, int nouser)
-{
- static struct ncache {
- uid_t uid;
- int found;
- char name[MAXLOGNAME];
- } c_uid[NCACHE];
- static int pwopen;
- struct passwd *pw;
- struct ncache *cp;
-
- cp = c_uid + (uid & MASK);
- if (cp->uid != uid || !*cp->name) {
- if (pwopen == 0) {
- setpassent(1);
- pwopen = 1;
- }
- pw = getpwuid(uid);
- cp->uid = uid;
- if (pw != NULL) {
- cp->found = 1;
- (void)strncpy(cp->name, pw->pw_name, MAXLOGNAME - 1);
- cp->name[MAXLOGNAME - 1] = '\0';
- } else {
- cp->found = 0;
- (void)snprintf(cp->name, MAXLOGNAME - 1, "%u", uid);
- if (nouser)
- return (NULL);
- }
- }
- return ((nouser && !cp->found) ? NULL : cp->name);
-}
-
-const char *
-group_from_gid(gid_t gid, int nogroup)
-{
- static struct ncache {
- gid_t gid;
- int found;
- char name[MAXLOGNAME];
- } c_gid[NCACHE];
- static int gropen;
- struct group *gr;
- struct ncache *cp;
-
- cp = c_gid + (gid & MASK);
- if (cp->gid != gid || !*cp->name) {
- if (gropen == 0) {
- setgroupent(1);
- gropen = 1;
- }
- gr = getgrgid(gid);
- cp->gid = gid;
- if (gr != NULL) {
- cp->found = 1;
- (void)strncpy(cp->name, gr->gr_name, MAXLOGNAME - 1);
- cp->name[MAXLOGNAME - 1] = '\0';
- } else {
- cp->found = 0;
- (void)snprintf(cp->name, MAXLOGNAME - 1, "%u", gid);
- if (nogroup)
- return (NULL);
- }
- }
- return ((nogroup && !cp->found) ? NULL : cp->name);
-}
diff --git a/lib/libc/gen/rand48.3 b/lib/libc/gen/rand48.3
index 8d325a1..c70a832 100644
--- a/lib/libc/gen/rand48.3
+++ b/lib/libc/gen/rand48.3
@@ -12,7 +12,7 @@
.\" @(#)rand48.3 V1.0 MB 8 Oct 1993
.\" $FreeBSD$
.\"
-.Dd February 2, 2010
+.Dd September 4, 2012
.Dt RAND48 3
.Os
.Sh NAME
@@ -49,6 +49,14 @@
.Ft void
.Fn lcong48 "unsigned short p[7]"
.Sh DESCRIPTION
+.Bf -symbolic
+The functions described in this manual page are not cryptographically
+secure.
+Cryptographic applications should use
+.Xr arc4random 3
+instead.
+.Ef
+.Pp
The
.Fn rand48
family of functions generates pseudo-random numbers using a linear
@@ -174,10 +182,8 @@ It is thus not possible to use values greater than 0xffff as the addend.
Note that all three methods of seeding the random number generator
always also set the multiplicand and addend for any of the six
generator calls.
-.Pp
-For a more powerful random number generator, see
-.Xr random 3 .
.Sh SEE ALSO
+.Xr arc4random 3 ,
.Xr rand 3 ,
.Xr random 3
.Sh AUTHORS
diff --git a/lib/libc/gen/readpassphrase.c b/lib/libc/gen/readpassphrase.c
index d57e703..86c7811 100644
--- a/lib/libc/gen/readpassphrase.c
+++ b/lib/libc/gen/readpassphrase.c
@@ -68,7 +68,7 @@ restart:
* stdin and write to stderr unless a tty is required.
*/
if ((flags & RPP_STDIN) ||
- (input = output = _open(_PATH_TTY, O_RDWR)) == -1) {
+ (input = output = _open(_PATH_TTY, O_RDWR | O_CLOEXEC)) == -1) {
if (flags & RPP_REQUIRE_TTY) {
errno = ENOTTY;
return(NULL);
diff --git a/lib/libc/gen/sem_new.c b/lib/libc/gen/sem_new.c
index b748b49..b11d547 100644
--- a/lib/libc/gen/sem_new.c
+++ b/lib/libc/gen/sem_new.c
@@ -198,7 +198,7 @@ _sem_open(const char *name, int flags, ...)
goto error;
}
- fd = _open(path, flags|O_RDWR, mode);
+ fd = _open(path, flags|O_RDWR|O_CLOEXEC, mode);
if (fd == -1)
goto error;
if (flock(fd, LOCK_EX) == -1)
diff --git a/lib/libc/gen/signal.3 b/lib/libc/gen/signal.3
index 866eee3..a41d258 100644
--- a/lib/libc/gen/signal.3
+++ b/lib/libc/gen/signal.3
@@ -38,20 +38,11 @@
.Lb libc
.Sh SYNOPSIS
.In signal.h
-.\" XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX
-.\" The prototype for signal(3) cannot be cleanly marked up in -mdoc
-.\" without the following lower-level tweak.
-.nr in-synopsis-section 0
+.\" The following is Quite Ugly, but syntactically correct.
+.\" Don't try to fix it.
+.Ft void
+.Fn \*(lp*signal "int sig" "void \*(lp*func\*(rp\*(lpint\*(rp\*(rp\*(rp\*(lpint"
.Pp
-.Ft "void \*(lp*" Ns
-.Fo signal
-.Fa "int sig"
-.Fa "void \*(lp*func\*(rp\*(lpint\*(rp"
-.Fc Ns
-.Ft "\*(rp\*(lpint\*(rp" ;
-.Pp
-.nr in-synopsis-section 1
-.\" XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX
or in
.Fx Ap s
equivalent but easier to read typedef'd version:
@@ -98,7 +89,7 @@ an interrupt.
These signals are defined in the file
.In signal.h :
.Bl -column No ".Dv SIGVTALRM" "create core image"
-.It Sy "No Name Default Action Description"
+.It Sy "Num" Ta Sy "Name" Ta Sy "Default Action" Ta Sy "Description"
.It 1 Ta Dv SIGHUP Ta "terminate process" Ta "terminal line hangup"
.It 2 Ta Dv SIGINT Ta "terminate process" Ta "interrupt program"
.It 3 Ta Dv SIGQUIT Ta "create core image" Ta "quit program"
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c
index 80ae626..b7952b1 100644
--- a/lib/libc/gen/sysconf.c
+++ b/lib/libc/gen/sysconf.c
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
#include <sys/resource.h>
#include <sys/socket.h>
+#include <elf.h>
#include <errno.h>
#include <limits.h>
#include <paths.h>
@@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$");
#include "../stdlib/atexit.h"
#include "tzfile.h" /* from ../../../contrib/tzcode/stdtime */
+#include "libc_private.h"
#define _PATH_ZONEINFO TZDIR /* from tzfile.h */
@@ -357,11 +359,7 @@ yesno:
return (_POSIX_CLOCK_SELECTION);
#endif
case _SC_CPUTIME:
-#if _POSIX_CPUTIME == 0
-#error "_POSIX_CPUTIME"
-#else
return (_POSIX_CPUTIME);
-#endif
#ifdef notdef
case _SC_FILE_LOCKING:
/*
@@ -585,6 +583,8 @@ yesno:
case _SC_NPROCESSORS_CONF:
case _SC_NPROCESSORS_ONLN:
+ if (_elf_aux_info(AT_NCPUS, &value, sizeof(value)) == 0)
+ return ((long)value);
mib[0] = CTL_HW;
mib[1] = HW_NCPU;
break;
diff --git a/lib/libc/gen/sysctl.c b/lib/libc/gen/sysctl.c
index fbc2c0c..a5a3d49 100644
--- a/lib/libc/gen/sysctl.c
+++ b/lib/libc/gen/sysctl.c
@@ -50,8 +50,11 @@ int
sysctl(const int *name, u_int namelen, void *oldp, size_t *oldlenp,
const void *newp, size_t newlen)
{
- if (name[0] != CTL_USER)
- return (__sysctl(name, namelen, oldp, oldlenp, newp, newlen));
+ int retval;
+
+ retval = __sysctl(name, namelen, oldp, oldlenp, newp, newlen);
+ if (retval != -1 || errno != ENOENT || name[0] != CTL_USER)
+ return (retval);
if (newp != NULL) {
errno = EPERM;
diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c
index de438c4..6357761 100644
--- a/lib/libc/gen/syslog.c
+++ b/lib/libc/gen/syslog.c
@@ -300,7 +300,8 @@ vsyslog(int pri, const char *fmt, va_list ap)
* Make sure the error reported is the one from the syslogd failure.
*/
if (LogStat & LOG_CONS &&
- (fd = _open(_PATH_CONSOLE, O_WRONLY|O_NONBLOCK, 0)) >= 0) {
+ (fd = _open(_PATH_CONSOLE, O_WRONLY|O_NONBLOCK|O_CLOEXEC, 0)) >=
+ 0) {
struct iovec iov[2];
struct iovec *v = iov;
@@ -413,8 +414,10 @@ void
closelog(void)
{
THREAD_LOCK();
- (void)_close(LogFile);
- LogFile = -1;
+ if (LogFile != -1) {
+ (void)_close(LogFile);
+ LogFile = -1;
+ }
LogTag = NULL;
status = NOCONN;
THREAD_UNLOCK();
diff --git a/lib/libc/i386/SYS.h b/lib/libc/i386/SYS.h
index a4a147a..355b117 100644
--- a/lib/libc/i386/SYS.h
+++ b/lib/libc/i386/SYS.h
@@ -36,21 +36,21 @@
#include <sys/syscall.h>
#include <machine/asm.h>
-#define SYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \
- ENTRY(__CONCAT(__sys_,x)); \
+#define SYSCALL(x) ENTRY(__CONCAT(__sys_,x)); \
.weak CNAME(x); \
.set CNAME(x),CNAME(__CONCAT(__sys_,x)); \
.weak CNAME(__CONCAT(_,x)); \
.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
- mov __CONCAT($SYS_,x),%eax; KERNCALL; jb 2b
+ mov __CONCAT($SYS_,x),%eax; KERNCALL; \
+ jb HIDENAME(cerror)
#define RSYSCALL(x) SYSCALL(x); ret; END(__CONCAT(__sys_,x))
-#define PSEUDO(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \
- ENTRY(__CONCAT(__sys_,x)); \
+#define PSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \
.weak CNAME(__CONCAT(_,x)); \
.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
- mov __CONCAT($SYS_,x),%eax; KERNCALL; jb 2b; ret; \
+ mov __CONCAT($SYS_,x),%eax; KERNCALL; \
+ jb HIDENAME(cerror); ret; \
END(__CONCAT(__sys_,x))
/* gas messes up offset -- although we don't currently need it, do for BCS */
diff --git a/lib/libc/i386/Symbol.map b/lib/libc/i386/Symbol.map
index 8a01802..78be4c4 100644
--- a/lib/libc/i386/Symbol.map
+++ b/lib/libc/i386/Symbol.map
@@ -63,7 +63,6 @@ FBSDprivate_1.0 {
__sys_vfork;
_vfork;
_end;
- .cerror;
_brk;
.curbrk;
.minbrk;
diff --git a/lib/libc/i386/gen/getcontextx.c b/lib/libc/i386/gen/getcontextx.c
index 5908ce7..2d3b562 100644
--- a/lib/libc/i386/gen/getcontextx.c
+++ b/lib/libc/i386/gen/getcontextx.c
@@ -68,7 +68,7 @@ __getcontextx_size(void)
" movl %%ebx,%1\n"
" popl %%ebx\n"
: "=a" (p[0]), "=r" (p[1]), "=c" (p[2]), "=d" (p[3])
- : "0" (0x0));
+ : "0" (0x1));
if ((p[2] & CPUID2_OSXSAVE) != 0) {
__asm __volatile(
" pushl %%ebx\n"
diff --git a/lib/libc/i386/gen/rfork_thread.S b/lib/libc/i386/gen/rfork_thread.S
index 3333d84..1f8181d 100644
--- a/lib/libc/i386/gen/rfork_thread.S
+++ b/lib/libc/i386/gen/rfork_thread.S
@@ -113,8 +113,7 @@ ENTRY(rfork_thread)
popl %esi
movl %ebp, %esp
popl %ebp
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror))
+ jmp HIDENAME(cerror)
END(rfork_thread)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/i386/sys/Makefile.inc b/lib/libc/i386/sys/Makefile.inc
index 98a9c9e..9eefabc 100644
--- a/lib/libc/i386/sys/Makefile.inc
+++ b/lib/libc/i386/sys/Makefile.inc
@@ -5,7 +5,8 @@
SRCS+= i386_clr_watch.c i386_set_watch.c i386_vm86.c
.endif
SRCS+= i386_get_fsbase.c i386_get_gsbase.c i386_get_ioperm.c i386_get_ldt.c \
- i386_set_fsbase.c i386_set_gsbase.c i386_set_ioperm.c i386_set_ldt.c
+ i386_set_fsbase.c i386_set_gsbase.c i386_set_ioperm.c i386_set_ldt.c \
+ __vdso_gettc.c
MDASM= Ovfork.S brk.S cerror.S exect.S getcontext.S pipe.S ptrace.S \
reboot.S sbrk.S setlogin.S sigreturn.S syscall.S
diff --git a/lib/libc/i386/sys/Ovfork.S b/lib/libc/i386/sys/Ovfork.S
index e3cc45d..3ef7169 100644
--- a/lib/libc/i386/sys/Ovfork.S
+++ b/lib/libc/i386/sys/Ovfork.S
@@ -50,8 +50,7 @@ ENTRY(__sys_vfork)
jmp *%ecx
1:
pushl %ecx
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror))
+ jmp HIDENAME(cerror)
END(__sys_vfork)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/i386/sys/__vdso_gettc.c b/lib/libc/i386/sys/__vdso_gettc.c
new file mode 100644
index 0000000..4419141
--- /dev/null
+++ b/lib/libc/i386/sys/__vdso_gettc.c
@@ -0,0 +1,50 @@
+/*-
+ * Copyright (c) 2012 Konstantin Belousov <kib@FreeBSD.org>
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/vdso.h>
+#include <machine/cpufunc.h>
+
+static u_int
+__vdso_gettc_low(const struct vdso_timehands *th)
+{
+ uint32_t rv;
+
+ __asm __volatile("rdtsc; shrd %%cl, %%edx, %0"
+ : "=a" (rv) : "c" (th->th_x86_shift) : "edx");
+ return (rv);
+}
+
+#pragma weak __vdso_gettc
+u_int
+__vdso_gettc(const struct vdso_timehands *th)
+{
+
+ return (th->th_x86_shift > 0 ? __vdso_gettc_low(th) : rdtsc32());
+}
diff --git a/lib/libc/i386/sys/brk.S b/lib/libc/i386/sys/brk.S
index 968e437..8a465d2 100644
--- a/lib/libc/i386/sys/brk.S
+++ b/lib/libc/i386/sys/brk.S
@@ -58,14 +58,11 @@ ENTRY(brk)
ok:
mov $SYS_break,%eax
KERNCALL
- jb err
+ jb HIDENAME(cerror)
movl 4(%esp),%eax
movl %eax,(%edx)
movl $0,%eax
ret
-err:
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror))
#else
@@ -77,13 +74,11 @@ err:
ok:
mov $SYS_break,%eax
KERNCALL
- jb err
+ jb HIDENAME(cerror)
movl 4(%esp),%eax
movl %eax,HIDENAME(curbrk)
movl $0,%eax
ret
-err:
- jmp HIDENAME(cerror)
#endif
END(brk)
diff --git a/lib/libc/i386/sys/cerror.S b/lib/libc/i386/sys/cerror.S
index 129cc1b..ad3a033 100644
--- a/lib/libc/i386/sys/cerror.S
+++ b/lib/libc/i386/sys/cerror.S
@@ -48,13 +48,14 @@ __FBSDID("$FreeBSD$");
.globl CNAME(__error)
.type CNAME(__error),@function
HIDENAME(cerror):
- pushl %eax
#ifdef PIC
- /* The caller must execute the PIC prologue before jumping to cerror. */
+ PIC_PROLOGUE
+ pushl %eax
call PIC_PLT(CNAME(__error))
popl %ecx
PIC_EPILOGUE
#else
+ pushl %eax
call CNAME(__error)
popl %ecx
#endif
diff --git a/lib/libc/i386/sys/exect.S b/lib/libc/i386/sys/exect.S
index 3ae87b8..1378b4b 100644
--- a/lib/libc/i386/sys/exect.S
+++ b/lib/libc/i386/sys/exect.S
@@ -47,8 +47,7 @@ ENTRY(exect)
pushl %edx
popf
KERNCALL
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror)) /* exect(file, argv, env); */
+ jmp HIDENAME(cerror) /* exect(file, argv, env); */
END(exect)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/i386/sys/getcontext.S b/lib/libc/i386/sys/getcontext.S
index c24dbdc..7114689 100644
--- a/lib/libc/i386/sys/getcontext.S
+++ b/lib/libc/i386/sys/getcontext.S
@@ -42,12 +42,9 @@ ENTRY(__sys_getcontext)
movl (%esp),%ecx /* save getcontext return address */
mov $SYS_getcontext,%eax
KERNCALL
- jb 1f
+ jb HIDENAME(cerror)
addl $4,%esp /* remove stale (setcontext) return address */
jmp *%ecx /* restore return address */
-1:
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror))
END(__sys_getcontext)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/i386/sys/ptrace.S b/lib/libc/i386/sys/ptrace.S
index 6e5e885..e4bdf7c 100644
--- a/lib/libc/i386/sys/ptrace.S
+++ b/lib/libc/i386/sys/ptrace.S
@@ -50,11 +50,8 @@ ENTRY(ptrace)
#endif
mov $SYS_ptrace,%eax
KERNCALL
- jb err
+ jb HIDENAME(cerror)
ret
-err:
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror))
END(ptrace)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/i386/sys/sbrk.S b/lib/libc/i386/sys/sbrk.S
index 337087a..99fc220 100644
--- a/lib/libc/i386/sys/sbrk.S
+++ b/lib/libc/i386/sys/sbrk.S
@@ -59,7 +59,7 @@ ENTRY(sbrk)
addl %eax,4(%esp)
mov $SYS_break,%eax
KERNCALL
- jb err
+ jb HIDENAME(cerror)
PIC_PROLOGUE
movl PIC_GOT(HIDENAME(curbrk)),%edx
movl (%edx),%eax
@@ -67,9 +67,6 @@ ENTRY(sbrk)
PIC_EPILOGUE
back:
ret
-err:
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror))
#else /* !PIC */
@@ -80,13 +77,11 @@ err:
addl %eax,4(%esp)
mov $SYS_break,%eax
KERNCALL
- jb err
+ jb HIDENAME(cerror)
movl HIDENAME(curbrk),%eax
addl %ecx,HIDENAME(curbrk)
back:
ret
-err:
- jmp HIDENAME(cerror)
#endif /* PIC */
END(sbrk)
diff --git a/lib/libc/i386/sys/syscall.S b/lib/libc/i386/sys/syscall.S
index e5d6e23..8a08631 100644
--- a/lib/libc/i386/sys/syscall.S
+++ b/lib/libc/i386/sys/syscall.S
@@ -45,11 +45,8 @@ ENTRY(syscall)
KERNCALL
push %ecx /* need to push a word to keep stack frame intact
upon return; the word must be the return address. */
- jb 1f
+ jb HIDENAME(cerror)
ret
-1:
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror))
END(syscall)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h
index 2182f46..faae028 100644
--- a/lib/libc/include/libc_private.h
+++ b/lib/libc/include/libc_private.h
@@ -34,6 +34,7 @@
#ifndef _LIBC_PRIVATE_H_
#define _LIBC_PRIVATE_H_
+#include <sys/_types.h>
#include <sys/_pthreadtypes.h>
/*
@@ -245,6 +246,12 @@ extern void * __sys_freebsd6_mmap(void *, __size_t, int, int, int, int, __off_t)
/* Without back-compat translation */
extern int __sys_fcntl(int, int, ...);
+struct timespec;
+struct timeval;
+struct timezone;
+int __sys_gettimeofday(struct timeval *, struct timezone *);
+int __sys_clock_gettime(__clockid_t, struct timespec *ts);
+
/* execve() with PATH processing to implement posix_spawnp() */
int _execvpe(const char *, char * const *, char * const *);
diff --git a/lib/libc/include/port_before.h b/lib/libc/include/port_before.h
index beef71d..304dd66 100644
--- a/lib/libc/include/port_before.h
+++ b/lib/libc/include/port_before.h
@@ -17,6 +17,6 @@
var = _u.v; \
} while (0)
-#define UNUSED(x) (x) = (x)
+#define UNUSED(x) (void)(x)
#endif /* _PORT_BEFORE_H_ */
diff --git a/lib/libc/locale/Makefile.inc b/lib/libc/locale/Makefile.inc
index adae8bd..f2161be 100644
--- a/lib/libc/locale/Makefile.inc
+++ b/lib/libc/locale/Makefile.inc
@@ -30,7 +30,8 @@ MAN+= btowc.3 \
ctype.3 digittoint.3 isalnum.3 isalpha.3 isascii.3 isblank.3 iscntrl.3 \
isdigit.3 isgraph.3 isideogram.3 islower.3 isphonogram.3 isprint.3 \
ispunct.3 isrune.3 isspace.3 isspecial.3 \
- isupper.3 iswalnum.3 isxdigit.3 localeconv.3 mblen.3 mbrlen.3 \
+ isupper.3 iswalnum.3 iswalnum_l.3 isxdigit.3 \
+ localeconv.3 mblen.3 mbrlen.3 \
mbrtowc.3 \
mbsinit.3 \
mbsrtowcs.3 mbstowcs.3 mbtowc.3 multibyte.3 \
@@ -46,6 +47,11 @@ MAN+= big5.5 euc.5 gb18030.5 gb2312.5 gbk.5 mskanji.5 utf8.5
MLINKS+=btowc.3 wctob.3
MLINKS+=isdigit.3 isnumber.3
+MLINKS+=isgraph.3 isgraph_l.3
+MLINKS+=islower.3 islower_l.3
+MLINKS+=ispunct.3 ispunct_l.3
+MLINKS+=isspace.3 isspace_l.3
+MLINKS+=nl_langinfo.3 nl_langinfo_l.3
MLINKS+=iswalnum.3 iswalpha.3 iswalnum.3 iswascii.3 iswalnum.3 iswblank.3 \
iswalnum.3 iswcntrl.3 iswalnum.3 iswdigit.3 iswalnum.3 iswgraph.3 \
iswalnum.3 iswhexnumber.3 \
@@ -53,6 +59,18 @@ MLINKS+=iswalnum.3 iswalpha.3 iswalnum.3 iswascii.3 iswalnum.3 iswblank.3 \
iswalnum.3 iswphonogram.3 iswalnum.3 iswprint.3 iswalnum.3 iswpunct.3 \
iswalnum.3 iswrune.3 iswalnum.3 iswspace.3 iswalnum.3 iswspecial.3 \
iswalnum.3 iswupper.3 iswalnum.3 iswxdigit.3
+MLINKS+=iswalnum_l.3 iswalpha_l.3 iswalnum_l.3 iswcntrl_l.3 \
+ iswalnum_l.3 iswctype_l.3 iswalnum_l.3 iswdigit_l.3 \
+ iswalnum_l.3 iswgraph_l.3 iswalnum_l.3 iswlower_l.3 \
+ iswalnum_l.3 iswprint_l.3 iswalnum_l.3 iswpunct_l.3 \
+ iswalnum_l.3 iswspace_l.3 iswalnum_l.3 iswupper_l.3 \
+ iswalnum_l.3 iswxdigit_l.3 iswalnum_l.3 towlower_l.3 \
+ iswalnum_l.3 towupper_l.3 iswalnum_l.3 wctype_l.3 \
+ iswalnum_l.3 iswblank_l.3 iswalnum_l.3 iswhexnumber_l.3 \
+ iswalnum_l.3 iswideogram_l.3 iswalnum_l.3 iswnumber_l.3 \
+ iswalnum_l.3 iswphonogram_l.3 iswalnum_l.3 iswrune_l.3 \
+ iswalnum_l.3 iswspecial_l.3 iswalnum_l.3 nextwctype_l.3 \
+ iswalnum_l.3 towctrans_l.3 iswalnum_l.3 wctrans_l.3
MLINKS+=isxdigit.3 ishexnumber.3
MLINKS+=mbsrtowcs.3 mbsnrtowcs.3
MLINKS+=wcsrtombs.3 wcsnrtombs.3
diff --git a/lib/libc/locale/collate.c b/lib/libc/locale/collate.c
index 448e605..676d41c 100644
--- a/lib/libc/locale/collate.c
+++ b/lib/libc/locale/collate.c
@@ -56,11 +56,11 @@ __FBSDID("$FreeBSD$");
* We also modify the collation table test functions to search the thread-local
* table first and the global table second.
*/
-#define __collate_load_error (table->__collate_load_error)
#define __collate_substitute_nontrivial (table->__collate_substitute_nontrivial)
#define __collate_substitute_table_ptr (table->__collate_substitute_table_ptr)
#define __collate_char_pri_table_ptr (table->__collate_char_pri_table_ptr)
#define __collate_chain_pri_table (table->__collate_chain_pri_table)
+int __collate_load_error;
struct xlocale_collate __xlocale_global_collate = {
@@ -109,7 +109,9 @@ __collate_load(const char *encoding, locale_t unused)
int
__collate_load_tables(const char *encoding)
{
- return __collate_load_tables_l(encoding, &__xlocale_global_collate);
+ int ret = __collate_load_tables_l(encoding, &__xlocale_global_collate);
+ __collate_load_error = __xlocale_global_collate.__collate_load_error;
+ return ret;
}
int
@@ -123,7 +125,7 @@ __collate_load_tables_l(const char *encoding, struct xlocale_collate *table)
/* 'encoding' must be already checked. */
if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) {
- __collate_load_error = 1;
+ table->__collate_load_error = 1;
return (_LDP_CACHE);
}
@@ -240,7 +242,7 @@ __collate_load_tables_l(const char *encoding, struct xlocale_collate *table)
break;
}
}
- __collate_load_error = 0;
+ table->__collate_load_error = 0;
return (_LDP_LOADED);
}
diff --git a/lib/libc/locale/ctype_l.3 b/lib/libc/locale/ctype_l.3
index 385125e..5f427de 100644
--- a/lib/libc/locale/ctype_l.3
+++ b/lib/libc/locale/ctype_l.3
@@ -135,4 +135,17 @@ See the specific manual pages for more information.
.Xr xlocale 3
.Sh STANDARDS
These functions conform to
-.St -p1003.1-2008 .
+.St -p1003.1-2008 ,
+except for
+.Fn digittoint_l ,
+.Fn isascii_l ,
+.Fn ishexnumber_l ,
+.Fn isideogram_l ,
+.Fn isnumber_l ,
+.Fn isphonogram_l ,
+.Fn isrune_l
+and
+.Fn isspecial_l
+which are
+.Fx
+extensions.
diff --git a/lib/libc/locale/isgraph.3 b/lib/libc/locale/isgraph.3
index bedf31e..95a8319 100644
--- a/lib/libc/locale/isgraph.3
+++ b/lib/libc/locale/isgraph.3
@@ -32,7 +32,7 @@
.\" @(#)isgraph.3 8.2 (Berkeley) 12/11/93
.\" $FreeBSD$
.\"
-.Dd July 17, 2005
+.Dd July 30, 2012
.Dt ISGRAPH 3
.Os
.Sh NAME
@@ -44,6 +44,8 @@
.In ctype.h
.Ft int
.Fn isgraph "int c"
+.Ft int
+.Fn isgraph_l "int c" "locale_t loc"
.Sh DESCRIPTION
The
.Fn isgraph
@@ -79,11 +81,19 @@ In the ASCII character set, this includes the following characters
.It "\&166\ ``v''" Ta "167\ ``w''" Ta "170\ ``x''" Ta "171\ ``y''" Ta "172\ ``z''"
.It "\&173\ ``{''" Ta "174\ ``|''" Ta "175\ ``}''" Ta "176\ ``~''" Ta \&
.El
+.Pp
+The
+.Fn isgraph_l
+function takes an explicit locale argument, whereas the
+.Fn isgraph
+function uses the current global or per-thread locale.
.Sh RETURN VALUES
The
.Fn isgraph
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
+and
+.Fn isgraph_l
+functions return zero if the character tests false and
+return non-zero if the character tests true.
.Sh COMPATIBILITY
The
.Bx 4.4
@@ -103,3 +113,7 @@ The
.Fn isgraph
function conforms to
.St -isoC .
+The
+.Fn isgraph_l
+function conforms to
+.St -p1003.1-2008 .
diff --git a/lib/libc/locale/islower.3 b/lib/libc/locale/islower.3
index 987ff59..0b340da 100644
--- a/lib/libc/locale/islower.3
+++ b/lib/libc/locale/islower.3
@@ -32,7 +32,7 @@
.\" @(#)islower.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd July 17, 2005
+.Dd July 30, 2012
.Dt ISLOWER 3
.Os
.Sh NAME
@@ -44,6 +44,8 @@
.In ctype.h
.Ft int
.Fn islower "int c"
+.Ft int
+.Fn islower_l "int c" "locale_t loc"
.Sh DESCRIPTION
The
.Fn islower
@@ -63,11 +65,18 @@ In the ASCII character set, this includes the following characters
.It "\&165\ ``u''" Ta "166\ ``v''" Ta "167\ ``w''" Ta "170\ ``x''" Ta "171\ ``y''"
.It "\&172\ ``z''" Ta \& Ta \& Ta \& Ta \&
.El
+The
+.Fn islower_l
+function takes an explicit locale argument, whereas the
+.Fn islower
+function uses the current global or per-thread locale.
.Sh RETURN VALUES
The
.Fn islower
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
+and
+.Fn islower_l
+functions return zero if the character tests false and
+return non-zero if the character tests true.
.Sh COMPATIBILITY
The
.Bx 4.4
@@ -88,3 +97,7 @@ The
.Fn islower
function conforms to
.St -isoC .
+The
+.Fn islower_l
+function conforms to
+.St -p1003.1-2008 .
diff --git a/lib/libc/locale/ispunct.3 b/lib/libc/locale/ispunct.3
index 8fcfe54..c06b25d 100644
--- a/lib/libc/locale/ispunct.3
+++ b/lib/libc/locale/ispunct.3
@@ -32,7 +32,7 @@
.\" @(#)ispunct.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd July 17, 2005
+.Dd July 30, 2012
.Dt ISPUNCT 3
.Os
.Sh NAME
@@ -44,6 +44,8 @@
.In ctype.h
.Ft int
.Fn ispunct "int c"
+.Ft int
+.Fn ispunct_l "int c" "locale_t loc"
.Sh DESCRIPTION
The
.Fn ispunct
@@ -69,11 +71,19 @@ In the ASCII character set, this includes the following characters
.It "\&136\ ``^''" Ta "137\ ``_''" Ta "140\ ```''" Ta "173\ ``{''" Ta "174\ ``|''"
.It "\&175\ ``}''" Ta "176\ ``~''" Ta \& Ta \& Ta \&
.El
+.Pp
+The
+.Fn ispunct_l
+function takes an explicit locale argument, whereas the
+.Fn ispunct
+function uses the current global or per-thread locale.
.Sh RETURN VALUES
The
.Fn ispunct
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
+and
+.Fn ispunct_l
+functions return zero if the character tests false and
+return non-zero if the character tests true.
.Sh COMPATIBILITY
The
.Bx 4.4
@@ -93,3 +103,7 @@ The
.Fn ispunct
function conforms to
.St -isoC .
+The
+.Fn ispunct_l
+function conforms to
+.St -p1003.1-2008 .
diff --git a/lib/libc/locale/isspace.3 b/lib/libc/locale/isspace.3
index 6dfeb5f..5dfd1b6 100644
--- a/lib/libc/locale/isspace.3
+++ b/lib/libc/locale/isspace.3
@@ -32,7 +32,7 @@
.\" @(#)isspace.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd July 17, 2005
+.Dd July 30, 2012
.Dt ISSPACE 3
.Os
.Sh NAME
@@ -44,6 +44,8 @@
.In ctype.h
.Ft int
.Fn isspace "int c"
+.Ft int
+.Fn isspace_l "int c" "locale_t loc"
.Sh DESCRIPTION
The
.Fn isspace
@@ -60,11 +62,19 @@ The value of the argument must be representable as an
.Vt "unsigned char"
or the value of
.Dv EOF .
+.Pp
+The
+.Fn isspace_l
+function takes an explicit locale argument, whereas the
+.Fn isspace
+function uses the current global or per-thread locale.
.Sh RETURN VALUES
The
.Fn isspace
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
+and
+.Fn isspace_l
+functions return zero if the character tests false and
+return non-zero if the character tests true.
.Sh COMPATIBILITY
The
.Bx 4.4
@@ -85,3 +95,7 @@ The
.Fn isspace
function conforms to
.St -isoC .
+The
+.Fn isspace_l
+function conforms to
+.St -p1003.1-2008 .
diff --git a/lib/libc/locale/iswalnum_l.3 b/lib/libc/locale/iswalnum_l.3
new file mode 100644
index 0000000..21ee48f
--- /dev/null
+++ b/lib/libc/locale/iswalnum_l.3
@@ -0,0 +1,168 @@
+.\" Copyright (c) 2012 Isabell Long <issyl0@FreeBSD.org>
+.\" 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$
+.\"
+.Dd July 25, 2012
+.Dt ISWALNUM_L 3
+.Os
+.Sh NAME
+.Nm iswalnum_l ,
+.Nm iswalpha_l ,
+.Nm iswcntrl_l ,
+.Nm iswctype_l ,
+.Nm iswdigit_l ,
+.Nm iswgraph_l ,
+.Nm iswlower_l ,
+.Nm iswprint_l ,
+.Nm iswpunct_l ,
+.Nm iswspace_l ,
+.Nm iswupper_l ,
+.Nm iswxdigit_l ,
+.Nm towlower_l ,
+.Nm towupper_l ,
+.Nm wctype_l ,
+.Nm iswblank_l ,
+.Nm iswhexnumber_l ,
+.Nm iswideogram_l ,
+.Nm iswnumber_l ,
+.Nm iswphonogram_l ,
+.Nm iswrune_l ,
+.Nm iswspecial_l ,
+.Nm nextwctype_l ,
+.Nm towctrans_l ,
+.Nm wctrans_l
+.Nd wide character classification utilities
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In wctype.h
+.Ft int
+.Fn iswalnum_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswalpha_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswcntrl_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswctype_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswdigit_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswgraph_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswlower_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswprint_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswpunct_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswspace_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswupper_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswxdigit_l "wint_t wc" "locale_t loc"
+.Ft wint_t
+.Fn towlower_l "wint_t wc" "locale_t loc"
+.Ft wint_t
+.Fn towupper_l "wint_t wc" "locale_t loc"
+.Ft wctype_t
+.Fn wctype_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswblank_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswhexnumber_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswideogram_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswnumber_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswphonogram_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswrune_l "wint_t wc" "locale_t loc"
+.Ft int
+.Fn iswspecial_l "wint_t wc" "locale_t loc"
+.Ft wint_t
+.Fn nextwctype_l "wint_t wc" "locale_t loc"
+.Ft wint_t
+.Fn towctrans_l "wint_t wc" "wctrans_t" "locale_t loc"
+.Ft wctrans_t
+.Fn wctrans_l "const char *" "locale_t loc"
+.Sh DESCRIPTION
+The above functions are character classification utility functions,
+for use with wide characters
+.Vt ( wchar_t
+or
+.Vt wint_t )
+in the locale
+.Fa loc .
+They behave in the same way as the versions without the _l suffix, but use
+the specified locale rather than the global or per-thread locale.
+These functions may be implemented as inline functions in
+.In wctype.h
+and as functions in the C library.
+See the specific manual pages for more information.
+.Sh RETURN VALUES
+These functions return the same things as their non-locale versions.
+If the locale is invalid, their behaviors are undefined.
+.Sh SEE ALSO
+.Xr iswalnum 3 ,
+.Xr iswalpha 3 ,
+.Xr iswblank 3 ,
+.Xr iswcntrl 3 ,
+.Xr iswctype 3 ,
+.Xr iswdigit 3 ,
+.Xr iswgraph 3 ,
+.Xr iswhexnumber 3 ,
+.Xr iswideogram 3 ,
+.Xr iswlower 3 ,
+.Xr iswnumber 3 ,
+.Xr iswphonogram 3 ,
+.Xr iswprint 3 ,
+.Xr iswpunct 3 ,
+.Xr iswrune 3 ,
+.Xr iswspace 3 ,
+.Xr iswspecial 3 ,
+.Xr iswupper 3 ,
+.Xr iswxdigit 3 ,
+.Xr nextwctype 3 ,
+.Xr towctrans 3 ,
+.Xr towlower 3 ,
+.Xr towupper 3 ,
+.Xr wctrans 3 ,
+.Xr wctype 3
+.Sh STANDARDS
+These functions conform to
+.St -p1003.1-2008 ,
+except for
+.Fn iswascii_l ,
+.Fn iswhexnumber_l ,
+.Fn iswideogram_l ,
+.Fn iswphonogram_l ,
+.Fn iswrune_l ,
+.Fn iswspecial_l
+and
+.Fn nextwctype_l
+which are
+.Fx
+extensions.
diff --git a/lib/libc/locale/ldpart.c b/lib/libc/locale/ldpart.c
index ea7b388..ccf5e7f 100644
--- a/lib/libc/locale/ldpart.c
+++ b/lib/libc/locale/ldpart.c
@@ -87,7 +87,7 @@ __part_load_locale(const char *name,
strcat(filename, name);
strcat(filename, "/");
strcat(filename, category_filename);
- if ((fd = _open(filename, O_RDONLY)) < 0)
+ if ((fd = _open(filename, O_RDONLY | O_CLOEXEC)) < 0)
return (_LDP_ERROR);
if (_fstat(fd, &st) != 0)
goto bad_locale;
diff --git a/lib/libc/locale/nl_langinfo.3 b/lib/libc/locale/nl_langinfo.3
index 789cac2..d8c01b2 100644
--- a/lib/libc/locale/nl_langinfo.3
+++ b/lib/libc/locale/nl_langinfo.3
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 3, 2001
+.Dd July 30, 2012
.Dt NL_LANGINFO 3
.Os
.Sh NAME
@@ -36,11 +36,16 @@
.In langinfo.h
.Ft char *
.Fn nl_langinfo "nl_item item"
+.Ft char *
+.Fn nl_langinfo_l "nl_item item" "locale_t loc"
.Sh DESCRIPTION
The
.Fn nl_langinfo
function returns a pointer to a string containing information relevant to
-the particular language or cultural area defined in the program's locale.
+the particular language or cultural area defined in the program or thread's
+locale, or in the case of
+.Fn nl_langinfo_l ,
+the locale passed as the second argument.
The manifest constant names and values of
.Fa item
are defined in
@@ -60,6 +65,9 @@ In a locale where langinfo data is not defined,
returns a pointer to the corresponding string in the
.Tn POSIX
locale.
+.Fn nl_langinfo_l
+returns the same values as
+.Fn nl_langinfo .
In all locales,
.Fn nl_langinfo
returns a pointer to an empty string if
@@ -83,6 +91,10 @@ The
.Fn nl_langinfo
function conforms to
.St -susv2 .
+The
+.Fn nl_langinfo_l
+function conforms to
+.St -p1003.1-2008 .
.Sh HISTORY
The
.Fn nl_langinfo
diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c
index bc04e9e..3ffb649 100644
--- a/lib/libc/locale/setrunelocale.c
+++ b/lib/libc/locale/setrunelocale.c
@@ -67,7 +67,6 @@ extern _RuneLocale *_Read_RuneMagi(FILE *);
static int __setrunelocale(struct xlocale_ctype *l, const char *);
-#define __collate_load_error (table->__collate_load_error)
#define __collate_substitute_nontrivial (table->__collate_substitute_nontrivial)
#define __collate_substitute_table_ptr (table->__collate_substitute_table_ptr)
#define __collate_char_pri_table_ptr (table->__collate_char_pri_table_ptr)
@@ -89,6 +88,17 @@ const _RuneLocale *__getCurrentRuneLocale(void)
return XLOCALE_CTYPE(__get_locale())->runes;
}
+static void free_runes(_RuneLocale *rl)
+{
+ /* FIXME: The "EUC" check here is a hideous abstraction violation. */
+ if ((rl != &_DefaultRuneLocale) && (rl)) {
+ if (strcmp(rl->__encoding, "EUC") == 0) {
+ free(rl->__variable);
+ }
+ free(rl);
+ }
+}
+
static int
__setrunelocale(struct xlocale_ctype *l, const char *encoding)
{
@@ -102,6 +112,7 @@ __setrunelocale(struct xlocale_ctype *l, const char *encoding)
* The "C" and "POSIX" locale are always here.
*/
if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) {
+ free_runes(saved.runes);
(void) _none_init(l, (_RuneLocale*)&_DefaultRuneLocale);
return (0);
}
@@ -153,13 +164,7 @@ __setrunelocale(struct xlocale_ctype *l, const char *encoding)
if (ret == 0) {
/* Free the old runes if it exists. */
- /* FIXME: The "EUC" check here is a hideous abstraction violation. */
- if ((saved.runes != &_DefaultRuneLocale) && (saved.runes)) {
- if (strcmp(saved.runes->__encoding, "EUC") == 0) {
- free(saved.runes->__variable);
- }
- free(saved.runes);
- }
+ free_runes(saved.runes);
} else {
/* Restore the saved version if this failed. */
memcpy(l, &saved, sizeof(struct xlocale_ctype));
diff --git a/lib/libc/net/Makefile.inc b/lib/libc/net/Makefile.inc
index 4eadf98..e61021b 100644
--- a/lib/libc/net/Makefile.inc
+++ b/lib/libc/net/Makefile.inc
@@ -36,7 +36,7 @@ LFLAGS+=-P_nsyy
CLEANFILES+=nslexer.c
-nslexer.c: nslexer.l
+nslexer.c: nslexer.l nsparser.h
${LEX} ${LFLAGS} -o/dev/stdout ${.IMPSRC} | \
sed -e '/YY_BUF_SIZE/s/16384/1024/' >${.TARGET}
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c
index 8083c39..d11ff78 100644
--- a/lib/libc/net/getaddrinfo.c
+++ b/lib/libc/net/getaddrinfo.c
@@ -155,7 +155,6 @@ struct explore {
int e_af;
int e_socktype;
int e_protocol;
- const char *e_protostr;
int e_wild;
#define WILD_AF(ex) ((ex)->e_wild & 0x01)
#define WILD_SOCKTYPE(ex) ((ex)->e_wild & 0x02)
@@ -164,21 +163,21 @@ struct explore {
static const struct explore explore[] = {
#if 0
- { PF_LOCAL, ANY, ANY, NULL, 0x01 },
+ { PF_LOCAL, ANY, ANY, 0x01 },
#endif
#ifdef INET6
- { PF_INET6, SOCK_DGRAM, IPPROTO_UDP, "udp", 0x07 },
- { PF_INET6, SOCK_STREAM, IPPROTO_TCP, "tcp", 0x07 },
- { PF_INET6, SOCK_STREAM, IPPROTO_SCTP, "sctp", 0x03 },
- { PF_INET6, SOCK_SEQPACKET, IPPROTO_SCTP, "sctp", 0x07 },
- { PF_INET6, SOCK_RAW, ANY, NULL, 0x05 },
+ { PF_INET6, SOCK_DGRAM, IPPROTO_UDP, 0x07 },
+ { PF_INET6, SOCK_STREAM, IPPROTO_TCP, 0x07 },
+ { PF_INET6, SOCK_STREAM, IPPROTO_SCTP, 0x03 },
+ { PF_INET6, SOCK_SEQPACKET, IPPROTO_SCTP, 0x07 },
+ { PF_INET6, SOCK_RAW, ANY, 0x05 },
#endif
- { PF_INET, SOCK_DGRAM, IPPROTO_UDP, "udp", 0x07 },
- { PF_INET, SOCK_STREAM, IPPROTO_TCP, "tcp", 0x07 },
- { PF_INET, SOCK_STREAM, IPPROTO_SCTP, "sctp", 0x03 },
- { PF_INET, SOCK_SEQPACKET, IPPROTO_SCTP, "sctp", 0x07 },
- { PF_INET, SOCK_RAW, ANY, NULL, 0x05 },
- { -1, 0, 0, NULL, 0 },
+ { PF_INET, SOCK_DGRAM, IPPROTO_UDP, 0x07 },
+ { PF_INET, SOCK_STREAM, IPPROTO_TCP, 0x07 },
+ { PF_INET, SOCK_STREAM, IPPROTO_SCTP, 0x03 },
+ { PF_INET, SOCK_SEQPACKET, IPPROTO_SCTP, 0x07 },
+ { PF_INET, SOCK_RAW, ANY, 0x05 },
+ { -1, 0, 0, 0 },
};
#ifdef INET6
@@ -464,7 +463,7 @@ getaddrinfo(const char *hostname, const char *servname,
}
error = get_portmatch(pai, servname);
if (error)
- ERR(error);
+ goto bad;
*pai = ai0;
}
@@ -693,6 +692,8 @@ get_addrselectpolicy(struct policyhead *head)
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, &l, NULL, 0) < 0)
return (0);
+ if (l == 0)
+ return (0);
if ((buf = malloc(l)) == NULL)
return (0);
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), buf, &l, NULL, 0) < 0) {
diff --git a/lib/libc/net/ip6opt.c b/lib/libc/net/ip6opt.c
index d999fd4..003c625 100644
--- a/lib/libc/net/ip6opt.c
+++ b/lib/libc/net/ip6opt.c
@@ -461,7 +461,7 @@ inet6_opt_append(void *extbuf, socklen_t extlen, int offset, u_int8_t type,
int
inet6_opt_finish(void *extbuf, socklen_t extlen, int offset)
{
- int updatelen = offset > 0 ? (1 + ((offset - 1) | 7)) : 0;;
+ int updatelen = offset > 0 ? (1 + ((offset - 1) | 7)) : 0;
if (extbuf) {
u_int8_t *padp;
diff --git a/lib/libc/net/sctp_sys_calls.c b/lib/libc/net/sctp_sys_calls.c
index 3785a04..1e06f44 100644
--- a/lib/libc/net/sctp_sys_calls.c
+++ b/lib/libc/net/sctp_sys_calls.c
@@ -449,6 +449,7 @@ sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs)
opt_len = (socklen_t) ((size_t)asoc + sizeof(struct sctp_getaddresses));
addrs = calloc(1, (size_t)opt_len);
if (addrs == NULL) {
+ errno = ENOMEM;
return (-1);
}
addrs->sget_assoc_id = id;
@@ -777,6 +778,7 @@ sctp_sendx(int sd, const void *msg, size_t msg_len,
}
buf = malloc(len);
if (buf == NULL) {
+ errno = ENOMEM;
return (-1);
}
aa = (int *)buf;
@@ -1052,7 +1054,7 @@ sctp_sendv(int sd,
CMSG_SPACE(sizeof(struct sctp_authinfo)) +
(size_t)addrcnt * CMSG_SPACE(sizeof(struct in6_addr)));
if (cmsgbuf == NULL) {
- errno = ENOBUFS;
+ errno = ENOMEM;
return (-1);
}
msg.msg_control = cmsgbuf;
diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c
index 4532e90..44b1440 100644
--- a/lib/libc/nls/msgcat.c
+++ b/lib/libc/nls/msgcat.c
@@ -384,7 +384,7 @@ load_msgcat(const char *path, const char *name, const char *lang)
}
UNLOCK;
- if ((fd = _open(path, O_RDONLY)) == -1) {
+ if ((fd = _open(path, O_RDONLY | O_CLOEXEC)) == -1) {
SAVEFAIL(name, lang, errno);
NLRETERR(errno);
}
diff --git a/lib/libc/rpc/auth_des.c b/lib/libc/rpc/auth_des.c
index 8f363e9..1b45c3b 100644
--- a/lib/libc/rpc/auth_des.c
+++ b/lib/libc/rpc/auth_des.c
@@ -286,7 +286,7 @@ authdes_marshal(AUTH *auth, XDR *xdrs)
* Figure out the "time", accounting for any time difference
* with the server if necessary.
*/
- (void) gettimeofday(&ad->ad_timestamp, (struct timezone *)NULL);
+ (void)gettimeofday(&ad->ad_timestamp, NULL);
ad->ad_timestamp.tv_sec += ad->ad_timediff.tv_sec;
ad->ad_timestamp.tv_usec += ad->ad_timediff.tv_usec;
while (ad->ad_timestamp.tv_usec >= USEC_PER_SEC) {
diff --git a/lib/libc/rpc/auth_unix.c b/lib/libc/rpc/auth_unix.c
index c0d2548..5c138d0 100644
--- a/lib/libc/rpc/auth_unix.c
+++ b/lib/libc/rpc/auth_unix.c
@@ -94,10 +94,10 @@ struct audata {
AUTH *
authunix_create(machname, uid, gid, len, aup_gids)
char *machname;
- int uid;
- int gid;
+ u_int uid;
+ u_int gid;
int len;
- int *aup_gids;
+ u_int *aup_gids;
{
struct authunix_parms aup;
char mymem[MAX_AUTH_BYTES];
@@ -207,9 +207,8 @@ authunix_create_default()
abort();
if (ngids > NGRPS)
ngids = NGRPS;
- /* XXX: interface problem; those should all have been unsigned */
- auth = authunix_create(machname, (int)uid, (int)gid, ngids,
- (int *)gids);
+ /* XXX: interface problem; we should translate from uid_t and gid_t */
+ auth = authunix_create(machname, uid, gid, ngids, gids);
free(gids);
return (auth);
}
diff --git a/lib/libc/rpc/authunix_prot.c b/lib/libc/rpc/authunix_prot.c
index 7699e28..f80b176 100644
--- a/lib/libc/rpc/authunix_prot.c
+++ b/lib/libc/rpc/authunix_prot.c
@@ -60,19 +60,19 @@ xdr_authunix_parms(xdrs, p)
XDR *xdrs;
struct authunix_parms *p;
{
- int **paup_gids;
+ u_int **paup_gids;
assert(xdrs != NULL);
assert(p != NULL);
paup_gids = &p->aup_gids;
- if (xdr_u_long(xdrs, &(p->aup_time))
- && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME)
- && xdr_int(xdrs, &(p->aup_uid))
- && xdr_int(xdrs, &(p->aup_gid))
- && xdr_array(xdrs, (char **) paup_gids,
- &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) {
+ if (xdr_u_long(xdrs, &(p->aup_time)) &&
+ xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) &&
+ xdr_u_int(xdrs, &(p->aup_uid)) &&
+ xdr_u_int(xdrs, &(p->aup_gid)) &&
+ xdr_array(xdrs, (char **) paup_gids,
+ &(p->aup_len), NGRPS, sizeof(u_int), (xdrproc_t)xdr_u_int) ) {
return (TRUE);
}
return (FALSE);
diff --git a/lib/libc/rpc/clnt_vc.c b/lib/libc/rpc/clnt_vc.c
index 07eff46..881f84d 100644
--- a/lib/libc/rpc/clnt_vc.c
+++ b/lib/libc/rpc/clnt_vc.c
@@ -672,6 +672,10 @@ clnt_vc_destroy(cl)
if (ct->ct_addr.buf)
free(ct->ct_addr.buf);
mem_free(ct, sizeof(struct ct_data));
+ if (cl->cl_netid && cl->cl_netid[0])
+ mem_free(cl->cl_netid, strlen(cl->cl_netid) +1);
+ if (cl->cl_tp && cl->cl_tp[0])
+ mem_free(cl->cl_tp, strlen(cl->cl_tp) +1);
mem_free(cl, sizeof(CLIENT));
mutex_unlock(&clnt_fd_lock);
thr_sigsetmask(SIG_SETMASK, &(mask), NULL);
diff --git a/lib/libc/rpc/getnetpath.c b/lib/libc/rpc/getnetpath.c
index d1ea554..92eae95 100644
--- a/lib/libc/rpc/getnetpath.c
+++ b/lib/libc/rpc/getnetpath.c
@@ -99,9 +99,8 @@ setnetpath()
return (NULL);
}
if ((np_sessionp->nc_handlep = setnetconfig()) == NULL) {
- free(np_sessionp);
syslog (LOG_ERR, "rpc: failed to open " NETCONFIG);
- return (NULL);
+ goto failed;
}
np_sessionp->valid = NP_VALID;
np_sessionp->ncp_list = NULL;
diff --git a/lib/libc/rpc/rpc_generic.c b/lib/libc/rpc/rpc_generic.c
index ab259d5..0ac4597 100644
--- a/lib/libc/rpc/rpc_generic.c
+++ b/lib/libc/rpc/rpc_generic.c
@@ -269,7 +269,8 @@ __rpc_getconfip(nettype)
}
while ((nconf = getnetconfig(confighandle)) != NULL) {
if (strcmp(nconf->nc_protofmly, NC_INET) == 0) {
- if (strcmp(nconf->nc_proto, NC_TCP) == 0) {
+ if (strcmp(nconf->nc_proto, NC_TCP) == 0 &&
+ netid_tcp == NULL) {
netid_tcp = strdup(nconf->nc_netid);
if (main_thread)
netid_tcp_main = netid_tcp;
@@ -277,7 +278,8 @@ __rpc_getconfip(nettype)
thr_setspecific(tcp_key,
(void *) netid_tcp);
} else
- if (strcmp(nconf->nc_proto, NC_UDP) == 0) {
+ if (strcmp(nconf->nc_proto, NC_UDP) == 0 &&
+ netid_udp == NULL) {
netid_udp = strdup(nconf->nc_netid);
if (main_thread)
netid_udp_main = netid_udp;
diff --git a/lib/libc/rpc/rpc_soc.3 b/lib/libc/rpc/rpc_soc.3
index 8dedaa8..1af5728 100644
--- a/lib/libc/rpc/rpc_soc.3
+++ b/lib/libc/rpc/rpc_soc.3
@@ -148,7 +148,7 @@ default authentication used by
.Ft "AUTH *"
.Xc
.It Xo
-.Fn authunix_create "char *host" "int uid" "int gid" "int len" "int *aup_gids"
+.Fn authunix_create "char *host" "u_int uid" "u_int gid" "int len" "u_int *aup_gids"
.Xc
.Pp
Create and return an
diff --git a/lib/libc/rpc/svc_auth_des.c b/lib/libc/rpc/svc_auth_des.c
index de4d1b4..bd45f20 100644
--- a/lib/libc/rpc/svc_auth_des.c
+++ b/lib/libc/rpc/svc_auth_des.c
@@ -271,7 +271,7 @@ _svcauth_des(rqst, msg)
debug("timestamp before last seen");
return (AUTH_REJECTEDVERF); /* replay */
}
- (void) gettimeofday(&current, (struct timezone *)NULL);
+ (void)gettimeofday(&current, NULL);
current.tv_sec -= window; /* allow for expiration */
if (!BEFORE(&current, &timestamp)) {
debug("timestamp expired");
diff --git a/lib/libc/rpc/svc_auth_unix.c b/lib/libc/rpc/svc_auth_unix.c
index 4d6f102..20d4ecc 100644
--- a/lib/libc/rpc/svc_auth_unix.c
+++ b/lib/libc/rpc/svc_auth_unix.c
@@ -68,7 +68,7 @@ _svcauth_unix(rqst, msg)
struct area {
struct authunix_parms area_aup;
char area_machname[MAX_MACHINE_NAME+1];
- int area_gids[NGRPS];
+ u_int area_gids[NGRPS];
} *area;
u_int auth_len;
size_t str_len, gid_len;
diff --git a/lib/libc/stdio/fopen.3 b/lib/libc/stdio/fopen.3
index 64d033e..08438e7 100644
--- a/lib/libc/stdio/fopen.3
+++ b/lib/libc/stdio/fopen.3
@@ -267,7 +267,11 @@ and
.Fn freopen
functions
conform to
-.St -isoC .
+.St -isoC ,
+with the exception of the
+.Dq Li x
+mode option which conforms to
+.St -isoC-2011 .
The
.Fn fdopen
function
diff --git a/lib/libc/stdio/scanf_l.3 b/lib/libc/stdio/scanf_l.3
index 04ea5d9..405601e 100644
--- a/lib/libc/stdio/scanf_l.3
+++ b/lib/libc/stdio/scanf_l.3
@@ -57,7 +57,7 @@ The above functions scan input according to a specified
in the locale
.Fa loc .
They behave in the same way as the versions without the _l suffix, but use
-the specific locale rather than the the global or per-thread locale.
+the specific locale rather than the global or per-thread locale.
See the specific manual pages for more information.
.Sh SEE ALSO
.Xr scanf 3 ,
diff --git a/lib/libc/stdio/xprintf.c b/lib/libc/stdio/xprintf.c
index 0cc8571..b00b4cb 100644
--- a/lib/libc/stdio/xprintf.c
+++ b/lib/libc/stdio/xprintf.c
@@ -651,7 +651,7 @@ register_printf_render(int spec, printf_render *render, printf_arginfo_function
}
int
-register_printf_render_std(const unsigned char *specs)
+register_printf_render_std(const char *specs)
{
for (; *specs != '\0'; specs++) {
diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc
index 7fdb6e4..75204f5 100644
--- a/lib/libc/stdlib/Makefile.inc
+++ b/lib/libc/stdlib/Makefile.inc
@@ -42,6 +42,7 @@ MLINKS+=rand.3 rand_r.3 rand.3 srand.3 rand.3 sranddev.3
MLINKS+=random.3 initstate.3 random.3 setstate.3 random.3 srandom.3 \
random.3 srandomdev.3
MLINKS+=radixsort.3 sradixsort.3
+MLINKS+=strfmon.3 strfmon_l.3
MLINKS+=strtod.3 strtof.3 strtod.3 strtold.3
MLINKS+=strtol.3 strtoll.3 strtol.3 strtoq.3 strtol.3 strtoimax.3
MLINKS+=strtoul.3 strtoull.3 strtoul.3 strtouq.3 strtoul.3 strtoumax.3
diff --git a/lib/libc/stdlib/at_quick_exit.3 b/lib/libc/stdlib/at_quick_exit.3
index a75c0c0..c430154 100644
--- a/lib/libc/stdlib/at_quick_exit.3
+++ b/lib/libc/stdlib/at_quick_exit.3
@@ -58,4 +58,5 @@ function returns the value 0 if successful and a non-zero value on failure.
.Sh STANDARDS
The
.Fn at_quick_exit
-function conforms to the C1x draft specification.
+function conforms to
+.St -isoC-2011 .
diff --git a/lib/libc/stdlib/getenv.c b/lib/libc/stdlib/getenv.c
index b7826d7..47963d5 100644
--- a/lib/libc/stdlib/getenv.c
+++ b/lib/libc/stdlib/getenv.c
@@ -662,6 +662,7 @@ unsetenv(const char *name)
{
int envNdx;
size_t nameLen;
+ int newEnvActive;
/* Check for malformed name. */
if (name == NULL || (nameLen = __strleneq(name)) == 0) {
@@ -674,13 +675,18 @@ unsetenv(const char *name)
return (-1);
/* Deactivate specified variable. */
+ /* Remove all occurrences. */
envNdx = envVarsTotal - 1;
- if (__findenv(name, nameLen, &envNdx, true) != NULL) {
+ newEnvActive = envActive;
+ while (__findenv(name, nameLen, &envNdx, true) != NULL) {
envVars[envNdx].active = false;
if (envVars[envNdx].putenv)
__remove_putenv(envNdx);
- __rebuild_environ(envActive - 1);
+ envNdx--;
+ newEnvActive--;
}
+ if (newEnvActive != envActive)
+ __rebuild_environ(newEnvActive);
return (0);
}
diff --git a/lib/libc/stdlib/getopt_long.c b/lib/libc/stdlib/getopt_long.c
index bf7a04a..9f7f6d5 100644
--- a/lib/libc/stdlib/getopt_long.c
+++ b/lib/libc/stdlib/getopt_long.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getopt_long.c,v 1.21 2006/09/22 17:22:05 millert Exp $ */
+/* $OpenBSD: getopt_long.c,v 1.22 2006/10/04 21:29:04 jmc Exp $ */
/* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */
/*
@@ -35,13 +35,6 @@
* 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 NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
diff --git a/lib/libc/stdlib/ptsname.3 b/lib/libc/stdlib/ptsname.3
index 48da3bd..8e8ec07 100644
--- a/lib/libc/stdlib/ptsname.3
+++ b/lib/libc/stdlib/ptsname.3
@@ -102,7 +102,8 @@ of the slave device on success; otherwise a
pointer is returned.
.Sh ERRORS
The
-.Fn grantpt
+.Fn grantpt ,
+.Fn ptsname
and
.Fn unlockpt
functions may fail and set
diff --git a/lib/libc/stdlib/ptsname.c b/lib/libc/stdlib/ptsname.c
index 40b140d..3e4d4c0 100644
--- a/lib/libc/stdlib/ptsname.c
+++ b/lib/libc/stdlib/ptsname.c
@@ -77,7 +77,6 @@ ptsname(int fildes)
{
static char pt_slave[sizeof _PATH_DEV + SPECNAMELEN] = _PATH_DEV;
char *ret = NULL;
- int sverrno = errno;
/* Make sure fildes points to a master device. */
if (__isptmaster(fildes) != 0)
@@ -87,7 +86,6 @@ ptsname(int fildes)
sizeof pt_slave - (sizeof _PATH_DEV - 1)) != NULL)
ret = pt_slave;
-done: /* Make sure ptsname() does not overwrite errno. */
- errno = sverrno;
+done:
return (ret);
}
diff --git a/lib/libc/stdlib/quick_exit.3 b/lib/libc/stdlib/quick_exit.3
index 06fde8b..f2ea379 100644
--- a/lib/libc/stdlib/quick_exit.3
+++ b/lib/libc/stdlib/quick_exit.3
@@ -54,4 +54,5 @@ function does not return.
.Sh STANDARDS
The
.Fn quick_exit
-function conforms to the C1x draft specification.
+function conforms to
+.St -isoC-2011 .
diff --git a/lib/libc/stdlib/rand.3 b/lib/libc/stdlib/rand.3
index 3eb1a1d..390a40b 100644
--- a/lib/libc/stdlib/rand.3
+++ b/lib/libc/stdlib/rand.3
@@ -32,7 +32,7 @@
.\" @(#)rand.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd October 6, 2010
+.Dd September 4, 2012
.Dt RAND 3
.Os
.Sh NAME
@@ -55,9 +55,15 @@
.Fn rand_r "unsigned *ctx"
.Sh DESCRIPTION
.Bf -symbolic
+The functions described in this manual page are not cryptographically
+secure.
+Cryptographic applications should use
+.Xr arc4random 3
+instead.
+.Ef
+.Pp
These interfaces are obsoleted by
.Xr random 3 .
-.Ef
.Pp
The
.Fn rand
@@ -88,9 +94,6 @@ The
function initializes a seed using the
.Xr random 4
random number device which returns good random numbers.
-However, the
-.Fn rand
-function still remains unsuitable for cryptographic use.
.Pp
The
.Fn rand_r
@@ -105,8 +108,6 @@ For better generator quality, use
.Xr random 3
or
.Xr lrand48 3 .
-Applications requiring cryptographic quality randomness should use
-.Xr arc4random 3 .
.Sh SEE ALSO
.Xr arc4random 3 ,
.Xr lrand48 3 ,
diff --git a/lib/libc/stdlib/rand.c b/lib/libc/stdlib/rand.c
index 077c1ba..7041818 100644
--- a/lib/libc/stdlib/rand.c
+++ b/lib/libc/stdlib/rand.c
@@ -121,7 +121,7 @@ sranddev()
int fd, done;
done = 0;
- fd = _open("/dev/random", O_RDONLY, 0);
+ fd = _open("/dev/random", O_RDONLY | O_CLOEXEC, 0);
if (fd >= 0) {
if (_read(fd, (void *) &next, sizeof(next)) == sizeof(next))
done = 1;
@@ -130,10 +130,9 @@ sranddev()
if (!done) {
struct timeval tv;
- unsigned long junk;
gettimeofday(&tv, NULL);
- srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk);
+ srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec);
}
}
diff --git a/lib/libc/stdlib/random.3 b/lib/libc/stdlib/random.3
index c6502bf..4817440 100644
--- a/lib/libc/stdlib/random.3
+++ b/lib/libc/stdlib/random.3
@@ -28,7 +28,7 @@
.\" @(#)random.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd June 4, 1993
+.Dd September 4, 2012
.Dt RANDOM 3
.Os
.Sh NAME
@@ -53,6 +53,14 @@
.Ft char *
.Fn setstate "char *state"
.Sh DESCRIPTION
+.Bf -symbolic
+The functions described in this manual page are not cryptographically
+secure.
+Cryptographic applications should use
+.Xr arc4random 3
+instead.
+.Ef
+.Pp
The
.Fn random
function
@@ -98,10 +106,8 @@ as the seed.
.Pp
The
.Fn srandomdev
-routine initializes a state array using the
-.Xr random 4
-random number device which returns good random numbers,
-suitable for cryptographic use.
+routine initializes a state array using data from
+.Xr random 4 .
Note that this particular seeding
procedure can generate states which are impossible to reproduce by
calling
@@ -175,7 +181,6 @@ messages are printed on the standard error output.
.Xr arc4random 3 ,
.Xr lrand48 3 ,
.Xr rand 3 ,
-.Xr srand 3 ,
.Xr random 4
.Sh HISTORY
These
@@ -191,6 +196,3 @@ The historical implementation used to have a very weak seeding; the
random sequence did not vary much with the seed.
The current implementation employs a better pseudo-random number
generator for the initial state calculation.
-.Pp
-Applications requiring cryptographic quality randomness should use
-.Xr arc4random 3 .
diff --git a/lib/libc/stdlib/random.c b/lib/libc/stdlib/random.c
index f7be4a7..a3c054e 100644
--- a/lib/libc/stdlib/random.c
+++ b/lib/libc/stdlib/random.c
@@ -216,10 +216,8 @@ static int rand_deg = DEG_3;
static int rand_sep = SEP_3;
static uint32_t *end_ptr = &randtbl[DEG_3 + 1];
-static inline uint32_t good_rand(int32_t);
-
-static inline uint32_t good_rand (x)
- int32_t x;
+static inline uint32_t
+good_rand(int32_t x)
{
#ifdef USE_WEAK_SEEDING
/*
@@ -264,8 +262,7 @@ static inline uint32_t good_rand (x)
* for default usage relies on values produced by this routine.
*/
void
-srandom(x)
- unsigned long x;
+srandom(unsigned long x)
{
int i, lim;
@@ -295,7 +292,7 @@ srandom(x)
* a fixed seed.
*/
void
-srandomdev()
+srandomdev(void)
{
int fd, done;
size_t len;
@@ -306,7 +303,7 @@ srandomdev()
len = rand_deg * sizeof state[0];
done = 0;
- fd = _open("/dev/random", O_RDONLY, 0);
+ fd = _open("/dev/random", O_RDONLY | O_CLOEXEC, 0);
if (fd >= 0) {
if (_read(fd, (void *) state, len) == (ssize_t) len)
done = 1;
@@ -315,10 +312,9 @@ srandomdev()
if (!done) {
struct timeval tv;
- unsigned long junk;
gettimeofday(&tv, NULL);
- srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk);
+ srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec);
return;
}
@@ -352,10 +348,7 @@ srandomdev()
* complain about mis-alignment, but you should disregard these messages.
*/
char *
-initstate(seed, arg_state, n)
- unsigned long seed; /* seed for R.N.G. */
- char *arg_state; /* pointer to state array */
- long n; /* # bytes of state info */
+initstate(unsigned long seed, char *arg_state, long n)
{
char *ostate = (char *)(&state[-1]);
uint32_t *int_arg_state = (uint32_t *)arg_state;
@@ -367,7 +360,7 @@ initstate(seed, arg_state, n)
if (n < BREAK_0) {
(void)fprintf(stderr,
"random: not enough state (%ld bytes); ignored.\n", n);
- return(0);
+ return (0);
}
if (n < BREAK_1) {
rand_type = TYPE_0;
@@ -397,7 +390,7 @@ initstate(seed, arg_state, n)
int_arg_state[0] = rand_type;
else
int_arg_state[0] = MAX_TYPES * (rptr - state) + rand_type;
- return(ostate);
+ return (ostate);
}
/*
@@ -420,8 +413,7 @@ initstate(seed, arg_state, n)
* complain about mis-alignment, but you should disregard these messages.
*/
char *
-setstate(arg_state)
- char *arg_state; /* pointer to state array */
+setstate(char *arg_state)
{
uint32_t *new_state = (uint32_t *)arg_state;
uint32_t type = new_state[0] % MAX_TYPES;
@@ -452,7 +444,7 @@ setstate(arg_state)
fptr = &state[(rear + rand_sep) % rand_deg];
}
end_ptr = &state[rand_deg]; /* set end_ptr too */
- return(ostate);
+ return (ostate);
}
/*
@@ -473,7 +465,7 @@ setstate(arg_state)
* Returns a 31-bit random number.
*/
long
-random()
+random(void)
{
uint32_t i;
uint32_t *f, *r;
@@ -498,5 +490,5 @@ random()
fptr = f; rptr = r;
}
- return((long)i);
+ return ((long)i);
}
diff --git a/lib/libc/stdlib/realpath.c b/lib/libc/stdlib/realpath.c
index aded9b2..8fd5457 100644
--- a/lib/libc/stdlib/realpath.c
+++ b/lib/libc/stdlib/realpath.c
@@ -181,8 +181,6 @@ realpath(const char * __restrict path, char * __restrict resolved)
return (NULL);
}
if (lstat(resolved, &sb) != 0) {
- if (errno != ENOENT || p != NULL)
- errno = ENOTDIR;
if (m)
free(resolved);
return (NULL);
diff --git a/lib/libc/stdlib/strfmon.3 b/lib/libc/stdlib/strfmon.3
index 7a54f22..f82dfa3 100644
--- a/lib/libc/stdlib/strfmon.3
+++ b/lib/libc/stdlib/strfmon.3
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 12, 2002
+.Dd June 25, 2012
.Dt STRFMON 3
.Os
.Sh NAME
@@ -36,6 +36,8 @@
.In monetary.h
.Ft ssize_t
.Fn strfmon "char * restrict s" "size_t maxsize" "const char * restrict format" "..."
+.Ft ssize_t
+.Fn strfmon_l "char * restrict s" "size_t maxsize" "locale_t loc" "const char * restrict format" "..."
.Sh DESCRIPTION
The
.Fn strfmon
@@ -47,6 +49,12 @@ No more than
.Fa maxsize
bytes are placed into the array.
.Pp
+The
+.Fn strfmon_l
+function does the same as
+.Fn strfmon
+but takes an explicit locale rather than using the current locale.
+.Pp
The format string is composed of zero or more directives:
ordinary characters (not
.Cm % ) ,
@@ -129,6 +137,11 @@ the contents of the array are indeterminate,
and
.Va errno
is set to indicate the error.
+.Pp
+The
+.Fn strfmon_l
+function returns the same values as
+.Fn strfmon .
.Sh ERRORS
The
.Fn strfmon
@@ -149,6 +162,10 @@ The
function
conforms to
.St -p1003.1-2001 .
+The
+.Fn strfmon_l
+function conforms to
+.St -p1003.1-2008 .
.Sh AUTHORS
.An -nosplit
The
diff --git a/lib/libc/stdtime/Makefile.inc b/lib/libc/stdtime/Makefile.inc
index a039bc9..0cc038a 100644
--- a/lib/libc/stdtime/Makefile.inc
+++ b/lib/libc/stdtime/Makefile.inc
@@ -18,4 +18,6 @@ MLINKS+=ctime.3 asctime.3 ctime.3 difftime.3 ctime.3 gmtime.3 \
ctime.3 localtime.3 ctime.3 mktime.3 ctime.3 timegm.3 \
ctime.3 ctime_r.3 ctime.3 localtime_r.3 ctime.3 gmtime_r.3 \
ctime.3 asctime_r.3
+MLINKS+=strftime.3 strftime_l.3
+MLINKS+=strptime.3 strptime_l.3
MLINKS+=time2posix.3 posix2time.3
diff --git a/lib/libc/stdtime/strftime.3 b/lib/libc/stdtime/strftime.3
index d5cdd7d..0ed023b 100644
--- a/lib/libc/stdtime/strftime.3
+++ b/lib/libc/stdtime/strftime.3
@@ -32,7 +32,7 @@
.\" @(#)strftime.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd November 4, 2004
+.Dd June 25, 2012
.Dt STRFTIME 3
.Os
.Sh NAME
@@ -49,6 +49,8 @@
.Fa "const char * restrict format"
.Fa "const struct tm * restrict timeptr"
.Fc
+.Ft size_t
+.Fn strftime_l "char *restrict buf" "size_t maxsize" "const char * restrict format" "const struct tm *restrict timeptr" "locale_t loc"
.Sh DESCRIPTION
The
.Fn strftime
@@ -58,6 +60,11 @@ into the buffer
.Fa buf
according to the string pointed to by
.Fa format .
+The function
+.Fn strftime_l
+does the same as
+.Fn strftime
+but takes an explicit locale rather than using the current locale.
.Pp
The
.Fa format
@@ -268,6 +275,10 @@ The peculiar week number and year in the replacements of
and
.Ql \&%V
are defined in ISO 8601: 1988.
+The
+.Fn strftime_l
+function conforms to
+.St -p1003.1-2008 .
.Sh BUGS
There is no conversion specification for the phase of the moon.
.Pp
diff --git a/lib/libc/stdtime/strftime.c b/lib/libc/stdtime/strftime.c
index d3571ad..4ad0bc4 100644
--- a/lib/libc/stdtime/strftime.c
+++ b/lib/libc/stdtime/strftime.c
@@ -67,7 +67,7 @@ extern char * tzname[];
#define PAD_SPACE 2
#define PAD_ZERO 3
-static const char* fmt_padding[][4] = {
+static const char fmt_padding[][4][5] = {
/* DEFAULT, LESS, SPACE, ZERO */
#define PAD_FMT_MONTHDAY 0
#define PAD_FMT_HMS 0
diff --git a/lib/libc/stdtime/strptime.3 b/lib/libc/stdtime/strptime.3
index 763696b..34d2b79 100644
--- a/lib/libc/stdtime/strptime.3
+++ b/lib/libc/stdtime/strptime.3
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\" "
-.Dd January 4, 2003
+.Dd June 25, 2012
.Dt STRPTIME 3
.Os
.Sh NAME
@@ -41,6 +41,10 @@
.Fa "const char * restrict format"
.Fa "struct tm * restrict timeptr"
.Fc
+.In time.h
+.In xlocale.h
+.Ft char *
+.Fn strptime_l "const char * restrict buf" "const char * restrict format" "struct tm * restrict timeptr" "locale_t loc"
.Sh DESCRIPTION
The
.Fn strptime
@@ -53,6 +57,11 @@ and fills in the elements of the structure pointed to by
The resulting values will be relative to the local time zone.
Thus, it can be considered the reverse operation of
.Xr strftime 3 .
+The
+.Fn strptime_l
+function does the same as
+.Fn strptime ,
+but takes an explicit locale rather than using the current locale.
.Pp
The
.Fa format
@@ -104,6 +113,9 @@ that has not been required to satisfy the specified conversions in
It returns
.Dv NULL
if one of the conversions failed.
+.Fn strptime_l
+returns the same values as
+.Fn strptime .
.Sh SEE ALSO
.Xr date 1 ,
.Xr scanf 3 ,
diff --git a/lib/libc/string/Makefile.inc b/lib/libc/string/Makefile.inc
index 1dbe317..cd06fc8 100644
--- a/lib/libc/string/Makefile.inc
+++ b/lib/libc/string/Makefile.inc
@@ -42,10 +42,13 @@ MLINKS+=ffs.3 ffsl.3 \
ffs.3 flsll.3
MLINKS+=index.3 rindex.3
MLINKS+=memchr.3 memrchr.3
-MLINKS+=strcasecmp.3 strncasecmp.3
+MLINKS+=strcasecmp.3 strncasecmp.3 \
+ strcasecmp.3 strcasecmp_l.3 \
+ strcasecmp.3 strncasecmp_l.3
MLINKS+=strcat.3 strncat.3
MLINKS+=strchr.3 strrchr.3
MLINKS+=strcmp.3 strncmp.3
+MLINKS+=strcoll.3 strcoll_l.3
MLINKS+=strcpy.3 stpcpy.3 \
strcpy.3 stpncpy.3 \
strcpy.3 strncpy.3
@@ -57,8 +60,10 @@ MLINKS+=strerror.3 perror.3 \
MLINKS+=strlcpy.3 strlcat.3
MLINKS+=strlen.3 strnlen.3
MLINKS+=strstr.3 strcasestr.3 \
- strstr.3 strnstr.3
+ strstr.3 strnstr.3 \
+ strstr.3 strcasestr_l.3
MLINKS+=strtok.3 strtok_r.3
+MLINKS+=strxfrm.3 strxfrm_l.3
MLINKS+=wmemchr.3 wcpcpy.3 \
wmemchr.3 wcpncpy.3 \
wmemchr.3 wcscasecmp.3 \
diff --git a/lib/libc/string/ffs.3 b/lib/libc/string/ffs.3
index bf6f5f5..d8e11d8 100644
--- a/lib/libc/string/ffs.3
+++ b/lib/libc/string/ffs.3
@@ -30,7 +30,7 @@
.\" @(#)ffs.3 8.2 (Berkeley) 4/19/94
.\" $FreeBSD$
.\"
-.Dd May 3, 2011
+.Dd September 29, 2012
.Dt FFS 3
.Os
.Sh NAME
@@ -63,8 +63,7 @@ The
.Fn ffsl
and
.Fn ffsll
-functions find the first bit set
-(beginning with the least significant bit)
+functions find the first (least significant) bit set
in
.Fa value
and return the index of that bit.
@@ -74,11 +73,11 @@ The
.Fn flsl
and
.Fn flsll
-functions find the last bit set in
+functions find the last (most significant) bit set in
.Fa value
and return the index of that bit.
.Pp
-Bits are numbered starting at 1 (the least significant bit).
+Bits are numbered starting at 1, the least significant bit.
A return value of zero from any of these functions means that the
argument was zero.
.Sh SEE ALSO
diff --git a/lib/libc/string/strcasecmp.3 b/lib/libc/string/strcasecmp.3
index 2b2ef3e..760b9d4 100644
--- a/lib/libc/string/strcasecmp.3
+++ b/lib/libc/string/strcasecmp.3
@@ -45,6 +45,12 @@
.Fn strcasecmp "const char *s1" "const char *s2"
.Ft int
.Fn strncasecmp "const char *s1" "const char *s2" "size_t len"
+.In string.h
+.In xlocale.h
+.Ft int
+.Fn strcasecmp_l "const char *s1" "const char *s2" "locale_t loc"
+.Ft int
+.Fn strncasecmp_l "const char *s1" "const char *s2" "site_t len" "locale_t loc"
.Sh DESCRIPTION
The
.Fn strcasecmp
@@ -58,16 +64,22 @@ and
.Pp
The
.Fn strncasecmp
-compares at most
+function compares at most
.Fa len
characters.
-.Sh RETURN VALUES
The
+.Fn strcasecmp_l
+and
+.Fn strncasecmp_l
+functions do the same as their non-locale versions above, but take an
+explicit locale rather than using the current locale.
+.Sh RETURN VALUES
+The functions
.Fn strcasecmp
and
.Fn strncasecmp
return an integer greater than, equal to, or less than 0,
-according as
+depending on whether
.Fa s1
is lexicographically greater than, equal to, or less than
.Fa s2
@@ -77,6 +89,11 @@ The comparison is done using unsigned characters, so that
.Sq Li \e200
is greater than
.Ql \e0 .
+The functions
+.Fn strcasecmp_l
+and
+.Fn strncasecmp_l
+do the same but take explicit locales.
.Sh SEE ALSO
.Xr bcmp 3 ,
.Xr memcmp 3 ,
diff --git a/lib/libc/string/strcoll.3 b/lib/libc/string/strcoll.3
index bb8b13f..20f1888 100644
--- a/lib/libc/string/strcoll.3
+++ b/lib/libc/string/strcoll.3
@@ -44,6 +44,8 @@
.In string.h
.Ft int
.Fn strcoll "const char *s1" "const char *s2"
+.Ft int
+.Fn strcoll_l "const char *s1" "const char *s2" "locale_t loc"
.Sh DESCRIPTION
The
.Fn strcoll
@@ -54,7 +56,7 @@ and
.Fa s2
according to the current locale collation
and returns an integer greater than, equal to, or less than 0,
-according as
+depending on whether
.Fa s1
is greater than, equal to, or less than
.Fa s2 .
@@ -62,6 +64,9 @@ If information about the current locale collation is not available,
the value of
.Fn strcmp s1 s2
is returned.
+The
+.Fn strcoll_l
+function uses an explicit locale argument rather than the system locale.
.Sh SEE ALSO
.Xr setlocale 3 ,
.Xr strcmp 3 ,
@@ -70,6 +75,9 @@ is returned.
.Sh STANDARDS
The
.Fn strcoll
-function
-conforms to
+function conforms to
.St -isoC .
+The
+.Fn strcoll_l
+function conforms to
+.St -p1003.1-2008 .
diff --git a/lib/libc/string/strerror.3 b/lib/libc/string/strerror.3
index 5961a84..cc25602 100644
--- a/lib/libc/string/strerror.3
+++ b/lib/libc/string/strerror.3
@@ -174,10 +174,10 @@ function was implemented in
by
.An Wes Peters Aq wes@FreeBSD.org .
.Sh BUGS
-For unknown error numbers, the
+The
.Fn strerror
-function will return its result in a static buffer which
-may be overwritten by subsequent calls.
+function returns its result in a static buffer which
+will be overwritten by subsequent calls.
.Pp
The return type for
.Fn strerror
diff --git a/lib/libc/string/strsignal.c b/lib/libc/string/strsignal.c
index c51f34d..8fc1f85 100644
--- a/lib/libc/string/strsignal.c
+++ b/lib/libc/string/strsignal.c
@@ -120,29 +120,29 @@ strsignal(int num)
UPREFIX,
#endif
sizeof(sig_ebuf));
- }
- signum = num;
- if (num < 0)
- signum = -signum;
-
- t = tmp;
- do {
- *t++ = "0123456789"[signum % 10];
- } while (signum /= 10);
- if (num < 0)
- *t++ = '-';
-
- p = (ebuf + n);
- *p++ = ':';
- *p++ = ' ';
-
- for (;;) {
- *p++ = *--t;
- if (t <= tmp)
- break;
+ signum = num;
+ if (num < 0)
+ signum = -signum;
+
+ t = tmp;
+ do {
+ *t++ = "0123456789"[signum % 10];
+ } while (signum /= 10);
+ if (num < 0)
+ *t++ = '-';
+
+ p = (ebuf + n);
+ *p++ = ':';
+ *p++ = ' ';
+
+ for (;;) {
+ *p++ = *--t;
+ if (t <= tmp)
+ break;
+ }
+ *p = '\0';
}
- *p = '\0';
#if defined(NLS)
catclose(catd);
diff --git a/lib/libc/string/strstr.3 b/lib/libc/string/strstr.3
index 74ebdff..376def6 100644
--- a/lib/libc/string/strstr.3
+++ b/lib/libc/string/strstr.3
@@ -49,6 +49,10 @@
.Fn strcasestr "const char *big" "const char *little"
.Ft char *
.Fn strnstr "const char *big" "const char *little" "size_t len"
+.In string.h
+.In xlocale.h
+.Ft char *
+.Fn strcasestr_l "const char *big" "const char *little" "locale_t loc"
.Sh DESCRIPTION
The
.Fn strstr
@@ -65,6 +69,12 @@ function is similar to
but ignores the case of both strings.
.Pp
The
+.Fn strcasestr_l
+function does the same as
+.Fn strcasestr
+but takes an explicit locale rather than using the current locale.
+.Pp
+The
.Fn strnstr
function
locates the first occurrence of the null-terminated string
diff --git a/lib/libc/string/strxfrm.3 b/lib/libc/string/strxfrm.3
index 5f33763..da7c82a 100644
--- a/lib/libc/string/strxfrm.3
+++ b/lib/libc/string/strxfrm.3
@@ -44,6 +44,8 @@
.In string.h
.Ft size_t
.Fn strxfrm "char * restrict dst" "const char * restrict src" "size_t n"
+.Ft size_t
+.Fn strxfrm_l "char * restrict dst" "const char *restrict src" "size_t n" "locale_t loc"
.Sh DESCRIPTION
The
.Fn strxfrm
@@ -73,10 +75,16 @@ after
is equal to comparing
two original strings with
.Fn strcoll .
+.Pp
+.Fn strxfrm_l
+does the same, however takes an explicit locale rather than the global
+locale.
.Sh RETURN VALUES
Upon successful completion,
.Fn strxfrm
-returns the length of the transformed string not including
+and
+.Fn strxfrm_l
+return the length of the transformed string not including
the terminating null character.
If this value is
.Fa n
@@ -94,3 +102,7 @@ The
function
conforms to
.St -isoC .
+The
+.Fn strxfrm_l
+function conforms to
+.St -p1003.1-2008 .
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc
index 61d1713..df4ef42 100644
--- a/lib/libc/sys/Makefile.inc
+++ b/lib/libc/sys/Makefile.inc
@@ -15,6 +15,10 @@
#
.sinclude "${.CURDIR}/${LIBC_ARCH}/sys/Makefile.inc"
+SRCS+= clock_gettime.c gettimeofday.c __vdso_gettimeofday.c
+NOASM+= clock_gettime.o gettimeofday.o
+PSEUDO+= _clock_gettime.o _gettimeofday.o
+
# Sources common to both syscall interfaces:
SRCS+= stack_protector.c stack_protector_compat.c __error.c
.if !defined(WITHOUT_SYSCALL_COMPAT)
diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map
index f1c1567..008b8da 100644
--- a/lib/libc/sys/Symbol.map
+++ b/lib/libc/sys/Symbol.map
@@ -365,9 +365,6 @@ FBSD_1.2 {
cap_getmode;
cap_new;
cap_getrights;
- ffclock_getcounter;
- ffclock_getestimate;
- ffclock_setestimate;
getloginclass;
pdfork;
pdgetpid;
@@ -382,6 +379,10 @@ FBSD_1.2 {
};
FBSD_1.3 {
+ clock_getcpuclockid2;
+ ffclock_getcounter;
+ ffclock_getestimate;
+ ffclock_setestimate;
posix_fadvise;
};
@@ -490,6 +491,8 @@ FBSDprivate_1.0 {
__sys_chown;
_chroot;
__sys_chroot;
+ _clock_getcpuclockid2;
+ __sys_clock_getcpuclockid2;
_clock_getres;
__sys_clock_getres;
_clock_gettime;
diff --git a/lib/libc/sys/__vdso_gettimeofday.c b/lib/libc/sys/__vdso_gettimeofday.c
new file mode 100644
index 0000000..32abb69
--- /dev/null
+++ b/lib/libc/sys/__vdso_gettimeofday.c
@@ -0,0 +1,142 @@
+/*-
+ * Copyright (c) 2012 Konstantin Belousov <kib@FreeBSD.org>
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/elf.h>
+#include <sys/time.h>
+#include <sys/vdso.h>
+#include <errno.h>
+#include <time.h>
+#include <machine/atomic.h>
+#include "libc_private.h"
+
+static u_int
+tc_delta(const struct vdso_timehands *th)
+{
+
+ return ((__vdso_gettc(th) - th->th_offset_count) &
+ th->th_counter_mask);
+}
+
+static int
+binuptime(struct bintime *bt, struct vdso_timekeep *tk, int abs)
+{
+ struct vdso_timehands *th;
+ uint32_t curr, gen;
+
+ do {
+ if (!tk->tk_enabled)
+ return (ENOSYS);
+
+ /*
+ * XXXKIB. The load of tk->tk_current should use
+ * atomic_load_acq_32 to provide load barrier. But
+ * since tk points to r/o mapped page, x86
+ * implementation of atomic_load_acq faults.
+ */
+ curr = tk->tk_current;
+ rmb();
+ th = &tk->tk_th[curr];
+ if (th->th_algo != VDSO_TH_ALGO_1)
+ return (ENOSYS);
+ gen = th->th_gen;
+ *bt = th->th_offset;
+ bintime_addx(bt, th->th_scale * tc_delta(th));
+ if (abs)
+ bintime_add(bt, &th->th_boottime);
+
+ /*
+ * Barrier for load of both tk->tk_current and th->th_gen.
+ */
+ rmb();
+ } while (curr != tk->tk_current || gen == 0 || gen != th->th_gen);
+ return (0);
+}
+
+static struct vdso_timekeep *tk;
+
+int
+__vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
+{
+ struct bintime bt;
+ int error;
+
+ if (tz != NULL)
+ return (ENOSYS);
+ if (tk == NULL) {
+ error = _elf_aux_info(AT_TIMEKEEP, &tk, sizeof(tk));
+ if (error != 0 || tk == NULL)
+ return (ENOSYS);
+ }
+ if (tk->tk_ver != VDSO_TK_VER_CURR)
+ return (ENOSYS);
+ error = binuptime(&bt, tk, 1);
+ if (error != 0)
+ return (error);
+ bintime2timeval(&bt, tv);
+ return (0);
+}
+
+int
+__vdso_clock_gettime(clockid_t clock_id, struct timespec *ts)
+{
+ struct bintime bt;
+ int abs, error;
+
+ if (tk == NULL) {
+ error = _elf_aux_info(AT_TIMEKEEP, &tk, sizeof(tk));
+ if (error != 0 || tk == NULL)
+ return (ENOSYS);
+ }
+ if (tk->tk_ver != VDSO_TK_VER_CURR)
+ return (ENOSYS);
+ switch (clock_id) {
+ case CLOCK_REALTIME:
+ case CLOCK_REALTIME_PRECISE:
+ case CLOCK_REALTIME_FAST:
+ case CLOCK_SECOND:
+ abs = 1;
+ break;
+ case CLOCK_MONOTONIC:
+ case CLOCK_MONOTONIC_PRECISE:
+ case CLOCK_MONOTONIC_FAST:
+ case CLOCK_UPTIME:
+ case CLOCK_UPTIME_PRECISE:
+ case CLOCK_UPTIME_FAST:
+ abs = 0;
+ break;
+ default:
+ return (ENOSYS);
+ }
+ error = binuptime(&bt, tk, abs);
+ if (error != 0)
+ return (error);
+ bintime2timespec(&bt, ts);
+ if (clock_id == CLOCK_SECOND)
+ ts->tv_nsec = 0;
+ return (0);
+}
diff --git a/lib/libc/sys/clock_gettime.c b/lib/libc/sys/clock_gettime.c
new file mode 100644
index 0000000..e7e701b
--- /dev/null
+++ b/lib/libc/sys/clock_gettime.c
@@ -0,0 +1,52 @@
+/*-
+ * Copyright (c) 2012 Konstantin Belousov <kib@FreeBSD.org>
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/syscall.h>
+#include <sys/time.h>
+#include <sys/vdso.h>
+#include <errno.h>
+#include <time.h>
+#include "libc_private.h"
+
+int __clock_gettime(clockid_t, struct timespec *ts);
+
+__weak_reference(__clock_gettime, clock_gettime);
+
+int
+__clock_gettime(clockid_t clock_id, struct timespec *ts)
+{
+ int error;
+
+ if (__vdso_clock_gettime != NULL && __vdso_gettc != NULL)
+ error = __vdso_clock_gettime(clock_id, ts);
+ else
+ error = ENOSYS;
+ if (error == ENOSYS)
+ error = __sys_clock_gettime(clock_id, ts);
+ return (error);
+}
diff --git a/lib/libc/sys/dup.2 b/lib/libc/sys/dup.2
index d2a4b7e..7a07c21 100644
--- a/lib/libc/sys/dup.2
+++ b/lib/libc/sys/dup.2
@@ -138,6 +138,7 @@ is not a valid active descriptor
.It Bq Er EMFILE
Too many descriptors are active.
.El
+.Pp
The
.Fn dup2
system call fails if:
diff --git a/lib/libc/sys/fcntl.2 b/lib/libc/sys/fcntl.2
index beceb72..c174563 100644
--- a/lib/libc/sys/fcntl.2
+++ b/lib/libc/sys/fcntl.2
@@ -28,7 +28,7 @@
.\" @(#)fcntl.2 8.2 (Berkeley) 1/12/94
.\" $FreeBSD$
.\"
-.Dd January 28, 2012
+.Dd July 27, 2012
.Dt FCNTL 2
.Os
.Sh NAME
@@ -54,7 +54,7 @@ Depending on the value of
.Fn fcntl
can take an additional third argument
.Fa "int arg" .
-.Bl -tag -width F_GETOWNX
+.Bl -tag -width F_DUP2FD_CLOEXEC
.It Dv F_DUPFD
Return a new descriptor as follows:
.Pp
@@ -73,23 +73,44 @@ Same access mode (read, write or read/write).
Same file status flags (i.e., both file descriptors
share the same file status flags).
.It
-The close-on-exec flag associated with the new file descriptor
-is set to remain open across
+The close-on-exec flag
+.Dv FD_CLOEXEC
+associated with the new file descriptor is cleared, so the file descriptor is
+to remain open across
.Xr execve 2
system calls.
.El
+.It Dv F_DUPFD_CLOEXEC
+Like
+.Dv F_DUPFD ,
+but the
+.Dv FD_CLOEXEC
+flag associated with the new file descriptor is set, so the file descriptor
+is closed when
+.Xr execve 2
+system call executes.
.It Dv F_DUP2FD
It is functionally equivalent to
.Bd -literal -offset indent
dup2(fd, arg)
.Ed
+.It Dv F_DUP2FD_CLOEXEC
+Like
+.Dv F_DUP2FD ,
+but the
+.Dv FD_CLOEXEC
+flag associated with the new file descriptor is set.
.Pp
The
.Dv F_DUP2FD
-constant is not portable, so it should not be used if portability is needed.
+and
+.Dv F_DUP2FD_CLOEXEC
+constants are not portable, so they should not be used if
+portability is needed.
Use
.Fn dup2
-instead.
+instead of
+.Dv F_DUP2FD .
.It Dv F_GETFD
Get the close-on-exec flag associated with the file descriptor
.Fa fd
diff --git a/lib/libc/sys/fcntl.c b/lib/libc/sys/fcntl.c
index 470f8ab..480cc40 100644
--- a/lib/libc/sys/fcntl.c
+++ b/lib/libc/sys/fcntl.c
@@ -41,7 +41,7 @@ __fcntl_compat(int fd, int cmd, ...)
{
va_list args;
long arg;
- struct oflock ofl;
+ struct __oflock ofl;
struct flock *flp;
int res;
diff --git a/lib/libc/sys/gettimeofday.c b/lib/libc/sys/gettimeofday.c
new file mode 100644
index 0000000..4cc87e1
--- /dev/null
+++ b/lib/libc/sys/gettimeofday.c
@@ -0,0 +1,51 @@
+/*-
+ * Copyright (c) 2012 Konstantin Belousov <kib@FreeBSD.org>
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/syscall.h>
+#include <sys/time.h>
+#include <sys/vdso.h>
+#include <errno.h>
+#include "libc_private.h"
+
+int __gettimeofday(struct timeval *tv, struct timezone *tz);
+
+__weak_reference(__gettimeofday, gettimeofday);
+
+int
+__gettimeofday(struct timeval *tv, struct timezone *tz)
+{
+ int error;
+
+ if (__vdso_gettimeofday != NULL && __vdso_gettc != NULL)
+ error = __vdso_gettimeofday(tv, tz);
+ else
+ error = ENOSYS;
+ if (error == ENOSYS)
+ error = __sys_gettimeofday(tv, tz);
+ return (error);
+}
diff --git a/lib/libc/sys/kill.2 b/lib/libc/sys/kill.2
index 0389559..98c3050 100644
--- a/lib/libc/sys/kill.2
+++ b/lib/libc/sys/kill.2
@@ -64,11 +64,19 @@ This can be used to check the validity of
For a process to have permission to send a signal to a process designated
by
.Fa pid ,
-the real or effective user ID of the receiving process must match
-that of the sending process or the user must have appropriate privileges
-(such as given by a set-user-ID program or the user is the super-user).
+the user must be the super-user, or
+the real or saved user ID of the receiving process must match
+the real or effective user ID of the sending process.
A single exception is the signal SIGCONT, which may always be sent
-to any process with the same session ID as the caller.
+to any process with the same session ID as the sender.
+In addition, if the
+.Va security.bsd.conservative_signals
+.Xr sysctl
+is set to 1, the user is not a super-user, and
+the receiver is set-uid, then
+only job control and terminal control signals may
+be sent (in particular, only SIGKILL, SIGINT, SIGTERM, SIGALRM,
+SIGSTOP, SIGTTIN, SIGTTOU, SIGTSTP, SIGHUP, SIGUSR1, SIGUSR2).
.Bl -tag -width Ds
.It \&If Fa pid No \&is greater than zero :
The
@@ -124,10 +132,9 @@ is not a valid signal number.
No process or process group can be found corresponding to that specified by
.Fa pid .
.It Bq Er EPERM
-The sending process is not the super-user and its effective
-user id does not match the effective user-id of the receiving process.
-When signaling a process group, this error is returned if any members
-of the group could not be signaled.
+The sending process does not have permission to send
+.Va sig
+to the receiving process.
.El
.Sh SEE ALSO
.Xr getpgrp 2 ,
diff --git a/lib/libc/sys/listen.2 b/lib/libc/sys/listen.2
index bd6abde..ab22fd1 100644
--- a/lib/libc/sys/listen.2
+++ b/lib/libc/sys/listen.2
@@ -28,7 +28,7 @@
.\" From: @(#)listen.2 8.2 (Berkeley) 12/11/93
.\" $FreeBSD$
.\"
-.Dd August 29, 2005
+.Dd October 20, 2012
.Dt LISTEN 2
.Os
.Sh NAME
@@ -102,15 +102,15 @@ of service attacks are no longer necessary.
The
.Xr sysctl 3
MIB variable
-.Va kern.ipc.somaxconn
+.Va kern.ipc.soacceptqueue
specifies a hard limit on
.Fa backlog ;
if a value greater than
-.Va kern.ipc.somaxconn
+.Va kern.ipc.soacceptqueue
or less than zero is specified,
.Fa backlog
is silently forced to
-.Va kern.ipc.somaxconn .
+.Va kern.ipc.soacceptqueue .
.Sh INTERACTION WITH ACCEPT FILTERS
When accept filtering is used on a socket, a second queue will
be used to hold sockets that have connected, but have not yet
@@ -168,3 +168,17 @@ at run-time, and to use a negative
.Fa backlog
to request the maximum allowable value, was introduced in
.Fx 2.2 .
+The
+.Va kern.ipc.somaxconn
+.Xr sysctl 3
+has been replaced with
+.Va kern.ipc.soacceptqueue
+in
+.Fx 10.0
+to prevent confusion about its actual functionality.
+The original
+.Xr sysctl 3
+.Va kern.ipc.somaxconn
+is still available but hidden from a
+.Xr sysctl 3
+-a output so that existing applications and scripts continue to work.
diff --git a/lib/libc/sys/posix_fadvise.2 b/lib/libc/sys/posix_fadvise.2
index 37453ff..f303f42 100644
--- a/lib/libc/sys/posix_fadvise.2
+++ b/lib/libc/sys/posix_fadvise.2
@@ -28,7 +28,7 @@
.\" @(#)madvise.2 8.1 (Berkeley) 6/9/93
.\" $FreeBSD$
.\"
-.Dd February 25, 2012
+.Dd June 19, 2012
.Dt POSIX_FADVISE 2
.Os
.Sh NAME
@@ -84,10 +84,9 @@ specified range and future access to this data may require a read operation.
.It Dv POSIX_FADV_NOREUSE
Tells the system that the specified data will only be accessed once and
then not reused.
-Accesses to data within the specified range are treated as if the file
-descriptor has the
-.Dv O_DIRECT
-flag enabled.
+The system may decrease the in-memory priority of data once it has been
+read or written.
+Future access to this data may require a read operation.
.El
.Sh RETURN VALUES
.Rv -std posix_fadvise
diff --git a/lib/libc/sys/recv.2 b/lib/libc/sys/recv.2
index 66f311f..74f275c 100644
--- a/lib/libc/sys/recv.2
+++ b/lib/libc/sys/recv.2
@@ -28,7 +28,7 @@
.\" @(#)recv.2 8.3 (Berkeley) 2/21/94
.\" $FreeBSD$
.\"
-.Dd December 28, 2006
+.Dd September 12, 2012
.Dt RECV 2
.Os
.Sh NAME
@@ -44,7 +44,7 @@
.Ft ssize_t
.Fn recv "int s" "void *buf" "size_t len" "int flags"
.Ft ssize_t
-.Fn recvfrom "int s" "void * restrict buf" "size_t len" "int flags" "struct sockaddr * restrict from" "socklen_t * restrict fromlen"
+.Fn recvfrom "int s" "void *buf" "size_t len" "int flags" "struct sockaddr * restrict from" "socklen_t * restrict fromlen"
.Ft ssize_t
.Fn recvmsg "int s" "struct msghdr *msg" "int flags"
.Sh DESCRIPTION
@@ -252,8 +252,21 @@ struct cmsgcred {
};
.Ed
.Pp
-The kernel will fill in the credential information of the sending process
-and deliver it to the receiver.
+If a sender supplies ancillary data with enough space for the above struct
+tagged as
+.Dv SCM_CREDS
+control message type to the
+.Fn sendmsg
+system call, then kernel will fill in the credential information of the
+sending process and deliver it to the receiver.
+Since receiver usually has no control over a sender, this method of retrieving
+credential information isn't reliable.
+For reliable retrieval of remote side credentials it is advised to use the
+.Dv LOCAL_CREDS
+socket option on the receiving socket.
+See
+.Xr unix 4
+for details.
.Pp
The
.Fa msg_flags
@@ -322,7 +335,8 @@ address space.
.Xr getsockopt 2 ,
.Xr read 2 ,
.Xr select 2 ,
-.Xr socket 2
+.Xr socket 2 ,
+.Xr unix 4
.Sh HISTORY
The
.Fn recv
diff --git a/lib/libc/sys/sigaction.2 b/lib/libc/sys/sigaction.2
index 47b3a72..e161bf2 100644
--- a/lib/libc/sys/sigaction.2
+++ b/lib/libc/sys/sigaction.2
@@ -28,7 +28,7 @@
.\" From: @(#)sigaction.2 8.2 (Berkeley) 4/3/94
.\" $FreeBSD$
.\"
-.Dd April 18, 2010
+.Dd September 27, 2012
.Dt SIGACTION 2
.Os
.Sh NAME
@@ -586,13 +586,6 @@ system call
will fail and no new signal handler will be installed if one
of the following occurs:
.Bl -tag -width Er
-.It Bq Er EFAULT
-Either
-.Fa act
-or
-.Fa oact
-points to memory that is not a valid part of the process
-address space.
.It Bq Er EINVAL
The
.Fa sig
diff --git a/lib/libc/sys/sigwait.2 b/lib/libc/sys/sigwait.2
index a9e605c..525bffb 100644
--- a/lib/libc/sys/sigwait.2
+++ b/lib/libc/sys/sigwait.2
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 24, 2011
+.Dd September 27, 2012
.Dt SIGWAIT 2
.Os
.Sh NAME
@@ -107,9 +107,6 @@ The
.Fa set
argument
specifies one or more invalid signal numbers.
-.It Bq Er EFAULT
-Any arguments point outside the allocated address space or there is a
-memory protection fault.
.El
.Sh SEE ALSO
.Xr sigaction 2 ,
diff --git a/lib/libc/sys/sigwaitinfo.2 b/lib/libc/sys/sigwaitinfo.2
index a83de06..9109759 100644
--- a/lib/libc/sys/sigwaitinfo.2
+++ b/lib/libc/sys/sigwaitinfo.2
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 24, 2011
+.Dd September 27, 2012
.Dt SIGTIMEDWAIT 2
.Os
.Sh NAME
@@ -172,9 +172,6 @@ system calls fail if:
.Bl -tag -width Er
.It Bq Er EINTR
The wait was interrupted by an unblocked, caught signal.
-.It Bq Er EFAULT
-Any arguments point outside the allocated address space or there is a
-memory protection fault.
.Pp
.El
The
diff --git a/lib/libc/sys/wait.2 b/lib/libc/sys/wait.2
index e4812fc..71bd529 100644
--- a/lib/libc/sys/wait.2
+++ b/lib/libc/sys/wait.2
@@ -177,7 +177,7 @@ with a
value of -1.
.Pp
The following macros may be used to test the manner of exit of the process.
-One of the first three macros will evaluate to a non-zero (true) value:
+One of the first four macros will evaluate to a non-zero (true) value:
.Bl -tag -width Ds
.It Fn WIFCONTINUED status
True if the process has not terminated, and
diff --git a/lib/libc/yp/yplib.c b/lib/libc/yp/yplib.c
index 3dfc0aa..1778c6a 100644
--- a/lib/libc/yp/yplib.c
+++ b/lib/libc/yp/yplib.c
@@ -375,7 +375,7 @@ again:
ysd->dom_socket = -1;
}
snprintf(path, sizeof(path), "%s/%s.%d", BINDINGDIR, dom, 2);
- if ((fd = _open(path, O_RDONLY)) == -1) {
+ if ((fd = _open(path, O_RDONLY | O_CLOEXEC)) == -1) {
/* no binding file, YP is dead. */
/* Try to bring it back to life. */
_close(fd);
diff --git a/lib/libcalendar/Makefile.depend b/lib/libcalendar/Makefile.depend
new file mode 100644
index 0000000..ff699f7
--- /dev/null
+++ b/lib/libcalendar/Makefile.depend
@@ -0,0 +1,15 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libcam/Makefile.depend b/lib/libcam/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libcam/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libcom_err/Makefile.depend b/lib/libcom_err/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libcom_err/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libcompat/Makefile.depend b/lib/libcompat/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libcompat/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libcompiler_rt/Makefile.depend b/lib/libcompiler_rt/Makefile.depend
new file mode 100644
index 0000000..ff699f7
--- /dev/null
+++ b/lib/libcompiler_rt/Makefile.depend
@@ -0,0 +1,15 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libcrypt/Makefile b/lib/libcrypt/Makefile
index eea5572..7274e28 100644
--- a/lib/libcrypt/Makefile
+++ b/lib/libcrypt/Makefile
@@ -26,11 +26,7 @@ SRCS+= crypt-des.c crypt-blowfish.c blowfish.c
CFLAGS+= -I${.CURDIR} -DHAS_DES -DHAS_BLOWFISH
.endif
-# And the auth_getval() code and support.
-.PATH: ${.CURDIR}/../libutil
-SRCS+= auth.c property.c
-.for sym in auth_getval property_find properties_read properties_free \
- MD4Init MD4Final MD4Update MD4Pad \
+.for sym in MD4Init MD4Final MD4Update MD4Pad \
MD5Init MD5Final MD5Update MD5Pad \
SHA256_Init SHA256_Final SHA256_Update \
SHA512_Init SHA512_Final SHA512_Update
diff --git a/lib/libcrypt/Makefile.depend b/lib/libcrypt/Makefile.depend
new file mode 100644
index 0000000..16b5e42
--- /dev/null
+++ b/lib/libcrypt/Makefile.depend
@@ -0,0 +1,20 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ gnu/lib/libgcc \
+ include \
+ include/arpa \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libc \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libcrypt/crypt.3 b/lib/libcrypt/crypt.3
index 535ccdd..f14a6eb 100644
--- a/lib/libcrypt/crypt.3
+++ b/lib/libcrypt/crypt.3
@@ -238,12 +238,6 @@ The
.Fn crypt_set_format
function sets the default encoding format according to the supplied
.Fa string .
-.Pp
-The global default format can be set using the
-.Pa /etc/auth.conf
-file using the
-.Va crypt_default
-property.
.Sh RETURN VALUES
The
.Fn crypt
@@ -260,9 +254,7 @@ Otherwise, a value of 0 is returned.
.Sh SEE ALSO
.Xr login 1 ,
.Xr passwd 1 ,
-.Xr auth_getval 3 ,
.Xr getpass 3 ,
-.Xr auth.conf 5 ,
.Xr passwd 5
.Sh HISTORY
A rotor-based
diff --git a/lib/libcrypt/crypt.c b/lib/libcrypt/crypt.c
index b949a48..bfcbb20 100644
--- a/lib/libcrypt/crypt.c
+++ b/lib/libcrypt/crypt.c
@@ -79,23 +79,23 @@ static const struct {
}
};
+#ifdef HAS_DES
+#define CRYPT_DEFAULT "des"
+#else
+#define CRYPT_DEFAULT "md5"
+#endif
+
static int crypt_type = -1;
static void
crypt_setdefault(void)
{
- char *def;
size_t i;
if (crypt_type != -1)
return;
- def = auth_getval("crypt_default");
- if (def == NULL) {
- crypt_type = 0;
- return;
- }
for (i = 0; i < sizeof(crypt_types) / sizeof(crypt_types[0]) - 1; i++) {
- if (strcmp(def, crypt_types[i].name) == 0) {
+ if (strcmp(CRYPT_DEFAULT, crypt_types[i].name) == 0) {
crypt_type = (int)i;
return;
}
diff --git a/lib/libcxxrt/Version.map b/lib/libcxxrt/Version.map
index b5be60e..ca990a0 100644
--- a/lib/libcxxrt/Version.map
+++ b/lib/libcxxrt/Version.map
@@ -306,11 +306,6 @@ CXXRT_1.0 {
"std::type_info::__is_pointer_p() const";
- "operator delete[](void*)";
- "operator delete(void*)";
- "operator new[](unsigned long)";
- "operator new(unsigned long)";
- "operator new(unsigned long, std::nothrow_t const&)";
};
__cxa_allocate_dependent_exception;
@@ -321,3 +316,16 @@ CXXRT_1.0 {
__cxa_rethrow_primary_exception;
} CXXABI_1.3.1;
+
+GLIBCXX_3.4 {
+ extern "C++" {
+ "operator delete[](void*)";
+ "operator delete(void*)";
+ "operator new[](unsigned int)";
+ "operator new(unsigned int)";
+ "operator new(unsigned int, std::nothrow_t const&)";
+ "operator new[](unsigned long)";
+ "operator new(unsigned long)";
+ "operator new(unsigned long, std::nothrow_t const&)";
+ };
+};
diff --git a/lib/libdevinfo/Makefile.depend b/lib/libdevinfo/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libdevinfo/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libdevstat/Makefile.depend b/lib/libdevstat/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libdevstat/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libdisk/Makefile.depend b/lib/libdisk/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libdisk/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libdwarf/Makefile.depend b/lib/libdwarf/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libdwarf/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libdwarf/dwarf.h b/lib/libdwarf/dwarf.h
index ecbafcf..6eb2077 100644
--- a/lib/libdwarf/dwarf.h
+++ b/lib/libdwarf/dwarf.h
@@ -184,6 +184,7 @@
#define DW_FORM_ref8 0x14
#define DW_FORM_ref_udata 0x15
#define DW_FORM_indirect 0x16
+#define DW_FORM_flag_present 0x19
#define DW_OP_addr 0x03
#define DW_OP_deref 0x06
diff --git a/lib/libdwarf/dwarf_attrval.c b/lib/libdwarf/dwarf_attrval.c
index db07ee7..25286de 100644
--- a/lib/libdwarf/dwarf_attrval.c
+++ b/lib/libdwarf/dwarf_attrval.c
@@ -101,6 +101,7 @@ dwarf_attrval_flag(Dwarf_Die die, uint64_t attr, Dwarf_Bool *valp, Dwarf_Error *
} else {
switch (av->av_form) {
case DW_FORM_flag:
+ case DW_FORM_flag_present:
*valp = (Dwarf_Bool) av->u[0].u64;
break;
default:
diff --git a/lib/libdwarf/dwarf_dump.c b/lib/libdwarf/dwarf_dump.c
index e92fee0d..dc22800 100644
--- a/lib/libdwarf/dwarf_dump.c
+++ b/lib/libdwarf/dwarf_dump.c
@@ -240,6 +240,8 @@ get_form_desc(uint32_t form)
return "DW_FORM_data8";
case DW_FORM_flag:
return "DW_FORM_flag";
+ case DW_FORM_flag_present:
+ return "DW_FORM_flag_present";
case DW_FORM_indirect:
return "DW_FORM_indirect";
case DW_FORM_ref1:
@@ -648,6 +650,7 @@ dwarf_dump_av(Dwarf_Die die, Dwarf_AttrValue av)
case DW_FORM_data4:
case DW_FORM_data8:
case DW_FORM_flag:
+ case DW_FORM_flag_present:
printf("%llu", (unsigned long long) av->u[0].u64);
break;
case DW_FORM_ref1:
diff --git a/lib/libdwarf/dwarf_errmsg.c b/lib/libdwarf/dwarf_errmsg.c
index ffc2020..ca37740 100644
--- a/lib/libdwarf/dwarf_errmsg.c
+++ b/lib/libdwarf/dwarf_errmsg.c
@@ -29,7 +29,7 @@
#include <stdio.h>
#include "_libdwarf.h"
-const char *_libdwarf_errors[] = {
+static const char *_libdwarf_errors[] = {
#define DEFINE_ERROR(N,S) [DWARF_E_##N] = S
DEFINE_ERROR(NONE, "No Error"),
DEFINE_ERROR(ERROR, "An error"),
diff --git a/lib/libdwarf/dwarf_init.c b/lib/libdwarf/dwarf_init.c
index 95642a0..6ebc7d9 100644
--- a/lib/libdwarf/dwarf_init.c
+++ b/lib/libdwarf/dwarf_init.c
@@ -396,6 +396,10 @@ dwarf_init_attr(Dwarf_Debug dbg, Elf_Data **dp, uint64_t *offsetp,
avref.u[1].s = elf_strptr(dbg->dbg_elf,
dbg->dbg_s[DWARF_debug_str].s_shnum, avref.u[0].u64);
break;
+ case DW_FORM_flag_present:
+ /* This form has no value encoded in the DIE. */
+ avref.u[0].u64 = 1;
+ break;
default:
DWARF_SET_ERROR(error, DWARF_E_NOT_IMPLEMENTED);
ret = DWARF_E_NOT_IMPLEMENTED;
@@ -547,7 +551,7 @@ dwarf_init_info(Dwarf_Debug dbg, Dwarf_Error *error)
Dwarf_Attribute at;
Dwarf_Die die;
uint64_t abnum;
- uint64_t die_offset = offset;;
+ uint64_t die_offset = offset;
abnum = dwarf_read_uleb128(&d, &offset);
diff --git a/lib/libedit/Makefile.depend b/lib/libedit/Makefile.depend
new file mode 100644
index 0000000..c578f2d
--- /dev/null
+++ b/lib/libedit/Makefile.depend
@@ -0,0 +1,55 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+editline.So: common.h
+editline.So: editline.c
+editline.So: emacs.h
+editline.So: fcns.c
+editline.So: fcns.h
+editline.So: help.c
+editline.So: help.h
+editline.So: vi.h
+editline.o: common.h
+editline.o: editline.c
+editline.o: emacs.h
+editline.o: fcns.c
+editline.o: fcns.h
+editline.o: help.c
+editline.o: help.h
+editline.o: vi.h
+editline.po: common.h
+editline.po: editline.c
+editline.po: emacs.h
+editline.po: fcns.c
+editline.po: fcns.h
+editline.po: help.c
+editline.po: help.h
+editline.po: vi.h
+readline.So: common.h
+readline.So: emacs.h
+readline.So: fcns.h
+readline.So: help.h
+readline.So: vi.h
+readline.o: common.h
+readline.o: emacs.h
+readline.o: fcns.h
+readline.o: help.h
+readline.o: vi.h
+readline.po: common.h
+readline.po: emacs.h
+readline.po: fcns.h
+readline.po: help.h
+readline.po: vi.h
+.endif
diff --git a/lib/libedit/chared.c b/lib/libedit/chared.c
index ffaaaa7..6a4f3f6 100644
--- a/lib/libedit/chared.c
+++ b/lib/libedit/chared.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $NetBSD: chared.c,v 1.25 2005/08/08 01:41:30 christos Exp $
+ * $NetBSD: chared.c,v 1.27 2009/02/15 21:55:23 christos Exp $
*/
#if !defined(lint) && !defined(SCCSID)
@@ -59,12 +59,12 @@ cv_undo(EditLine *el)
{
c_undo_t *vu = &el->el_chared.c_undo;
c_redo_t *r = &el->el_chared.c_redo;
- unsigned int size;
+ size_t size;
/* Save entire line for undo */
size = el->el_line.lastchar - el->el_line.buffer;
vu->len = size;
- vu->cursor = el->el_line.cursor - el->el_line.buffer;
+ vu->cursor = (int)(el->el_line.cursor - el->el_line.buffer);
memcpy(vu->buf, el->el_line.buffer, size);
/* save command info for redo */
@@ -83,7 +83,7 @@ cv_yank(EditLine *el, const char *ptr, int size)
{
c_kill_t *k = &el->el_chared.c_kill;
- memcpy(k->buf, ptr, size +0u);
+ memcpy(k->buf, ptr, (size_t)size);
k->last = k->buf + size;
}
@@ -97,7 +97,7 @@ c_insert(EditLine *el, int num)
char *cp;
if (el->el_line.lastchar + num >= el->el_line.limit) {
- if (!ch_enlargebufs(el, num +0u))
+ if (!ch_enlargebufs(el, (size_t)num))
return; /* can't go past end of buffer */
}
@@ -118,7 +118,7 @@ c_delafter(EditLine *el, int num)
{
if (el->el_line.cursor + num > el->el_line.lastchar)
- num = el->el_line.lastchar - el->el_line.cursor;
+ num = (int)(el->el_line.lastchar - el->el_line.cursor);
if (el->el_map.current != el->el_map.emacs) {
cv_undo(el);
@@ -159,7 +159,7 @@ c_delbefore(EditLine *el, int num)
{
if (el->el_line.cursor - num < el->el_line.buffer)
- num = el->el_line.cursor - el->el_line.buffer;
+ num = (int)(el->el_line.cursor - el->el_line.buffer);
if (el->el_map.current != el->el_map.emacs) {
cv_undo(el);
@@ -375,7 +375,7 @@ cv_delfini(EditLine *el)
/* sanity */
return;
- size = el->el_line.cursor - el->el_chared.c_vcmd.pos;
+ size = (int)(el->el_line.cursor - el->el_chared.c_vcmd.pos);
if (size == 0)
size = 1;
el->el_line.cursor = el->el_chared.c_vcmd.pos;
@@ -529,8 +529,7 @@ ch_reset(EditLine *el, int mclear)
}
private void
-ch__clearmacro(el)
- EditLine *el;
+ch__clearmacro(EditLine *el)
{
c_macro_t *ma = &el->el_chared.c_macro;
while (ma->level >= 0)
@@ -542,9 +541,7 @@ ch__clearmacro(el)
* Returns 1 if successful, 0 if not.
*/
protected int
-ch_enlargebufs(el, addlen)
- EditLine *el;
- size_t addlen;
+ch_enlargebufs(EditLine *el, size_t addlen)
{
size_t sz, newsz;
char *newbuffer, *oldbuf, *oldkbuf;
@@ -695,12 +692,12 @@ protected int
c_gets(EditLine *el, char *buf, const char *prompt)
{
char ch;
- int len;
+ ssize_t len;
char *cp = el->el_line.buffer;
if (prompt) {
len = strlen(prompt);
- memcpy(cp, prompt, len + 0u);
+ memcpy(cp, prompt, (size_t)len);
cp += len;
}
len = 0;
@@ -721,7 +718,7 @@ c_gets(EditLine *el, char *buf, const char *prompt)
case '\010': /* Delete and backspace */
case '\177':
- if (len <= 0) {
+ if (len == 0) {
len = -1;
break;
}
@@ -749,7 +746,7 @@ c_gets(EditLine *el, char *buf, const char *prompt)
el->el_line.buffer[0] = '\0';
el->el_line.lastchar = el->el_line.buffer;
el->el_line.cursor = el->el_line.buffer;
- return len;
+ return (int)len;
}
@@ -771,6 +768,6 @@ c_hpos(EditLine *el)
ptr >= el->el_line.buffer && *ptr != '\n';
ptr--)
continue;
- return (el->el_line.cursor - ptr - 1);
+ return (int)(el->el_line.cursor - ptr - 1);
}
}
diff --git a/lib/libedit/chared.h b/lib/libedit/chared.h
index 6636fc7..153fceb 100644
--- a/lib/libedit/chared.h
+++ b/lib/libedit/chared.h
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*
* @(#)chared.h 8.1 (Berkeley) 6/4/93
- * $NetBSD: chared.h,v 1.17 2006/03/06 21:11:56 christos Exp $
+ * $NetBSD: chared.h,v 1.18 2009/02/15 21:55:23 christos Exp $
* $FreeBSD$
*/
@@ -70,7 +70,7 @@ typedef struct c_macro_t {
* Undo information for vi - no undo in emacs (yet)
*/
typedef struct c_undo_t {
- int len; /* length of saved line */
+ ssize_t len; /* length of saved line */
int cursor; /* position of saved cursor */
char *buf; /* full saved text */
} c_undo_t;
diff --git a/lib/libedit/common.c b/lib/libedit/common.c
index d314eef..0599554 100644
--- a/lib/libedit/common.c
+++ b/lib/libedit/common.c
@@ -905,7 +905,7 @@ ed_command(EditLine *el, int c __unused)
int tmplen;
tmplen = c_gets(el, tmpbuf, "\n: ");
- term__putc('\n');
+ term__putc(el, '\n');
if (tmplen < 0 || (tmpbuf[tmplen] = 0, parse_line(el, tmpbuf)) == -1)
term_beep(el);
diff --git a/lib/libedit/edit/readline/Makefile.depend b/lib/libedit/edit/readline/Makefile.depend
new file mode 100644
index 0000000..29fda55
--- /dev/null
+++ b/lib/libedit/edit/readline/Makefile.depend
@@ -0,0 +1,14 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libedit/editline.3 b/lib/libedit/editline.3
index 9661d66..fe58321 100644
--- a/lib/libedit/editline.3
+++ b/lib/libedit/editline.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: editline.3,v 1.55 2007/01/12 16:31:13 christos Exp $
+.\" $NetBSD: editline.3,v 1.70 2009/07/05 21:55:24 perry Exp $
.\"
.\" Copyright (c) 1997-2003 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 12, 2007
+.Dd July 5, 2009
.Dt EDITLINE 3
.Os
.Sh NAME
@@ -162,6 +162,14 @@ is modified to contain the number of characters read.
Returns the line read if successful, or
.Dv NULL
if no characters were read or if an error occurred.
+If an error occurred,
+.Fa count
+is set to \-1 and
+.Dv errno
+contains the error code that caused it.
+The return value may not remain valid across calls to
+.Fn el_gets
+and must be copied if the data is to be retained.
.It Fn el_getc
Read a character from the tty.
.Fa ch
@@ -222,10 +230,30 @@ are supported, along with the required argument list:
Define prompt printing function as
.Fa f ,
which is to return a string that contains the prompt.
+.It Dv EL_PROMPT_ESC , Fa "char *(*f)(EditLine *)" , Fa "char c"
+Same as
+.Dv EL_PROMPT ,
+but the
+.Fa c
+argument indicates the start/stop literal prompt character.
+.Pp
+If a start/stop literal character is found in the prompt, the
+character itself
+is not printed, but characters after it are printed directly to the
+terminal without affecting the state of the current line.
+A subsequent second start/stop literal character ends this behavior.
+This is typically used to embed literal escape sequences that change the
+color/style of the terminal in the prompt.
+.Dv 0
+unsets it.
+.It Dv EL_REFRESH
+Re-display the current line on the next terminal line.
.It Dv EL_RPROMPT , Fa "char *(*f)(EditLine *)"
Define right side prompt printing function as
.Fa f ,
which is to return a string that contains the prompt.
+.It Dv EL_RPROMPT_ESC , Fa "char *(*f)(EditLine *)" , Fa "char c"
+Define the right prompt printing function but with a literal escape character.
.It Dv EL_TERMINAL , Fa "const char *type"
Define terminal type of the tty to be
.Fa type ,
@@ -259,66 +287,43 @@ reading command input:
and
.Dv SIGWINCH .
Otherwise, the current signal handlers will be used.
-.It Dv EL_BIND , Xo
-.Fa "const char *" ,
-.Fa "..." ,
-.Dv NULL
-.Xc
+.It Dv EL_BIND , Fa "const char *" , Fa "..." , Dv NULL
Perform the
.Ic bind
builtin command.
Refer to
.Xr editrc 5
for more information.
-.It Dv EL_ECHOTC , Xo
-.Fa "const char *" ,
-.Fa "..." ,
-.Dv NULL
-.Xc
+.It Dv EL_ECHOTC , Fa "const char *" , Fa "..." , Dv NULL
Perform the
.Ic echotc
builtin command.
Refer to
.Xr editrc 5
for more information.
-.It Dv EL_SETTC , Xo
-.Fa "const char *" ,
-.Fa "..." ,
-.Dv NULL
-.Xc
+.It Dv EL_SETTC , Fa "const char *" , Fa "..." , Dv NULL
Perform the
.Ic settc
builtin command.
Refer to
.Xr editrc 5
for more information.
-.It Dv EL_SETTY , Xo
-.Fa "const char *" ,
-.Fa "..." ,
-.Dv NULL
-.Xc
+.It Dv EL_SETTY , Fa "const char *" , Fa "..." , Dv NULL
Perform the
.Ic setty
builtin command.
Refer to
.Xr editrc 5
for more information.
-.It Dv EL_TELLTC , Xo
-.Fa "const char *" ,
-.Fa "..." ,
-.Dv NULL
-.Xc
+.It Dv EL_TELLTC , Fa "const char *" , Fa "..." , Dv NULL
Perform the
.Ic telltc
builtin command.
Refer to
.Xr editrc 5
for more information.
-.It Dv EL_ADDFN , Xo
-.Fa "const char *name" ,
-.Fa "const char *help" ,
-.Fa "unsigned char (*func)(EditLine *e, int ch)"
-.Xc
+.It Dv EL_ADDFN , Fa "const char *name" , Fa "const char *help" , \
+Fa "unsigned char (*func)(EditLine *e, int ch)"
Add a user defined function,
.Fn func ,
referred to as
@@ -360,10 +365,8 @@ Beep, and flush tty.
.It Dv CC_FATAL
Fatal error, reset tty to known state.
.El
-.It Dv EL_HIST , Xo
-.Fa "History *(*func)(History *, int op, ...)" ,
-.Fa "const char *ptr"
-.Xc
+.It Dv EL_HIST , Fa "History *(*func)(History *, int op, ...)" , \
+Fa "const char *ptr"
Defines which history function to use, which is usually
.Fn history .
.Fa ptr
@@ -435,10 +438,22 @@ The following values for
are supported, along with actual type of
.Fa result :
.Bl -tag -width 4n
-.It Dv EL_PROMPT , Fa "char *(*f)(EditLine *)"
-Return a pointer to the function that displays the prompt.
-.It Dv EL_RPROMPT , Fa "char *(*f)(EditLine *)"
-Return a pointer to the function that displays the rightside prompt.
+.It Dv EL_PROMPT , Fa "char *(*f)(EditLine *)" , Fa "char *c"
+Return a pointer to the function that displays the prompt in
+.Fa f .
+If
+.Fa c
+is not
+.Dv NULL ,
+return the start/stop literal prompt character in it.
+.It Dv EL_RPROMPT , Fa "char *(*f)(EditLine *)" , Fa "char *c"
+Return a pointer to the function that displays the prompt in
+.Fa f .
+If
+.Fa c
+is not
+.Dv NULL ,
+return the start/stop literal prompt character in it.
.It Dv EL_EDITOR , Fa "const char *"
Return the name of the editor, which will be one of
.Dq emacs
@@ -603,18 +618,11 @@ assumed to be created with
.Fn history_init .
.It Dv H_CLEAR
Clear the history.
-.It Dv H_FUNC , Xo
-.Fa "void *ptr" ,
-.Fa "history_gfun_t first" ,
-.Fa "history_gfun_t next" ,
-.Fa "history_gfun_t last" ,
-.Fa "history_gfun_t prev" ,
-.Fa "history_gfun_t curr" ,
-.Fa "history_sfun_t set" ,
-.Fa "history_vfun_t clear" ,
-.Fa "history_efun_t enter" ,
-.Fa "history_efun_t add"
-.Xc
+.It Dv H_FUNC , Fa "void *ptr" , Fa "history_gfun_t first" , \
+Fa "history_gfun_t next" , Fa "history_gfun_t last" , \
+Fa "history_gfun_t prev" , Fa "history_gfun_t curr" , \
+Fa "history_sfun_t set" , Fa "history_vfun_t clear" , \
+Fa "history_efun_t enter" , Fa "history_efun_t add"
Define functions to perform various history operations.
.Fa ptr
is the argument given to a function when it is invoked.
diff --git a/lib/libedit/editrc.5 b/lib/libedit/editrc.5
index 2fa1a63..f46b874 100644
--- a/lib/libedit/editrc.5
+++ b/lib/libedit/editrc.5
@@ -1,4 +1,4 @@
-.\" $NetBSD: editrc.5,v 1.20 2006/08/21 12:45:30 christos Exp $
+.\" $NetBSD: editrc.5,v 1.24 2009/04/11 22:17:52 wiz Exp $
.\"
.\" Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -89,16 +89,8 @@ shell.
.Pp
The following builtin commands are available:
.Bl -tag -width 4n
-.It Ic bind Xo
-.Op Fl a
-.Op Fl e
-.Op Fl k
-.Op Fl l
-.Op Fl r
-.Op Fl s
-.Op Fl v
-.Op Ar key Op Ar command
-.Xc
+.It Ic bind Oo Fl a Oc Oo Fl e Oc Oo Fl k Oc Oo Fl l Oc Oo Fl r Oc \
+Oo Fl s Oc Oo Fl v Oc Oo Ar key Oo Ar command Oc Oc
Without options, list all bound keys, and the editor command to which
each is bound.
If
@@ -192,11 +184,7 @@ if it has any, notably
.Sq \e
and
.Sq ^ .
-.It Ic echotc Xo
-.Op Fl sv
-.Ar arg
-.Ar ...
-.Xc
+.It Ic echotc Oo Fl sv Oc Ar arg Ar ...
Exercise terminal capabilities given in
.Ar arg Ar ... .
If
@@ -252,16 +240,8 @@ to
as defined in
.Xr termcap 5 .
No sanity checking is done.
-.It Ic setty Xo
-.Op Fl a
-.Op Fl d
-.Op Fl q
-.Op Fl x
-.Op Ar +mode
-.Op Ar -mode
-.Op Ar mode
-.Op Ar char=c
-.Xc
+.It Ic setty Oo Fl a Oc Oo Fl d Oc Oo Fl q Oc Oo Fl x Oc Oo Ar +mode Oc \
+Oo Ar -mode Oc Oo Ar mode Oc Oo Ar char=c Oc
Control which tty modes that
.Nm
will not allow the user to change.
diff --git a/lib/libedit/el.c b/lib/libedit/el.c
index 3b4036f..d6cfb2d 100644
--- a/lib/libedit/el.c
+++ b/lib/libedit/el.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $NetBSD: el.c,v 1.44 2006/12/15 22:13:33 christos Exp $
+ * $NetBSD: el.c,v 1.55 2009/07/25 21:19:23 christos Exp $
*/
#if !defined(lint) && !defined(SCCSID)
@@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
+#include <ctype.h>
#include "el.h"
#define HAVE_ISSETUGID
@@ -156,9 +157,21 @@ el_set(EditLine *el, int op, ...)
switch (op) {
case EL_PROMPT:
- case EL_RPROMPT:
- rv = prompt_set(el, va_arg(ap, el_pfunc_t), op);
+ case EL_RPROMPT: {
+ el_pfunc_t p = va_arg(ap, el_pfunc_t);
+
+ rv = prompt_set(el, p, 0, op);
+ break;
+ }
+
+ case EL_PROMPT_ESC:
+ case EL_RPROMPT_ESC: {
+ el_pfunc_t p = va_arg(ap, el_pfunc_t);
+ char c = va_arg(ap, int);
+
+ rv = prompt_set(el, p, c, op);
break;
+ }
case EL_TERMINAL:
rv = term_set(el, va_arg(ap, char *));
@@ -309,6 +322,12 @@ el_set(EditLine *el, int op, ...)
break;
}
+ case EL_REFRESH:
+ re_clear_display(el);
+ re_refresh(el);
+ term__flush(el);
+ break;
+
default:
rv = -1;
break;
@@ -335,9 +354,13 @@ el_get(EditLine *el, int op, ...)
switch (op) {
case EL_PROMPT:
- case EL_RPROMPT:
- rv = prompt_get(el, va_arg(ap, el_pfunc_t *), op);
+ case EL_RPROMPT: {
+ el_pfunc_t *p = va_arg(ap, el_pfunc_t *);
+ char *c = va_arg(ap, char *);
+
+ rv = prompt_get(el, p, c, op);
break;
+ }
case EL_EDITOR:
rv = map_get_editor(el, va_arg(ap, const char **));
@@ -364,7 +387,7 @@ el_get(EditLine *el, int op, ...)
char *argv[20];
int i;
- for (i = 1; i < sizeof(argv) / sizeof(argv[0]); i++)
+ for (i = 1; i < (int)(sizeof(argv) / sizeof(argv[0])); i++)
if ((argv[i] = va_arg(ap, char *)) == NULL)
break;
@@ -450,30 +473,6 @@ el_get(EditLine *el, int op, ...)
return (rv);
}
-/* el_data_get():
- * Set user private data.
- */
-public void
-el_data_set (el, data)
- EditLine *el;
- void *data;
-{
- el->el_data = data;
-
- return;
-}
-
-/* el_data_get():
- * Return user private data.
- */
-public void *
-el_data_get (el)
- EditLine *el;
-{
- if (el->el_data)
- return (el->el_data);
- return (NULL);
-}
/* el_line():
* Return editing info
@@ -495,12 +494,14 @@ el_source(EditLine *el, const char *fname)
FILE *fp;
size_t len;
char *ptr;
+#ifdef HAVE_ISSETUGID
+ char path[MAXPATHLEN];
+#endif
fp = NULL;
if (fname == NULL) {
#ifdef HAVE_ISSETUGID
static const char elpath[] = "/.editrc";
- char path[MAXPATHLEN];
if (issetugid())
return (-1);
@@ -529,6 +530,13 @@ el_source(EditLine *el, const char *fname)
if (len > 0 && ptr[len - 1] == '\n')
--len;
ptr[len] = '\0';
+
+ /* loop until first non-space char or EOL */
+ while (*ptr != '\0' && isspace((unsigned char)*ptr))
+ ptr++;
+ if (*ptr == '#')
+ continue; /* ignore, this is a comment line */
+
if (parse_line(el, ptr) == -1) {
(void) fclose(fp);
return (-1);
diff --git a/lib/libedit/el.h b/lib/libedit/el.h
index 8d0d152..67d01ff 100644
--- a/lib/libedit/el.h
+++ b/lib/libedit/el.h
@@ -115,6 +115,7 @@ struct editline {
FILE *el_errfile; /* Stdio stuff */
int el_infd; /* Input file descriptor */
int el_flags; /* Various flags. */
+ int el_errno; /* Local copy of errno */
coord_t el_cursor; /* Cursor location */
char **el_display; /* Real screen image = what is there */
char **el_vdisplay; /* Virtual screen image = what we see */
diff --git a/lib/libedit/histedit.h b/lib/libedit/histedit.h
index 8417bb3..8a6caf9 100644
--- a/lib/libedit/histedit.h
+++ b/lib/libedit/histedit.h
@@ -131,10 +131,10 @@ unsigned char _el_fn_sh_complete(EditLine *, int);
#define EL_GETCFN 13 /* , el_rfunc_t); */
#define EL_CLIENTDATA 14 /* , void *); */
#define EL_UNBUFFERED 15 /* , int); */
-#define EL_PREP_TERM 16 /* , int); */
+#define EL_PREP_TERM 16 /* , int); */
#define EL_GETTC 17 /* , const char *, ..., NULL); */
-#define EL_GETFP 18 /* , int, FILE **) */
-#define EL_SETFP 19 /* , int, FILE *) */
+#define EL_GETFP 18 /* , int, FILE **); */
+#define EL_SETFP 19 /* , int, FILE *); */
#define EL_REFRESH 20 /* , void); set */
#define EL_PROMPT_ESC 21 /* , prompt_func, Char); set/get */
#define EL_RPROMPT_ESC 22 /* , prompt_func, Char); set/get */
@@ -154,13 +154,6 @@ int el_source(EditLine *, const char *);
*/
void el_resize(EditLine *);
-
-/*
- * Set user private data.
- */
-void el_data_set(EditLine *, void *);
-void * el_data_get(EditLine *);
-
/*
* User-defined function interface.
*/
diff --git a/lib/libedit/history.c b/lib/libedit/history.c
index 76b3b07..8f30a05 100644
--- a/lib/libedit/history.c
+++ b/lib/libedit/history.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $NetBSD: history.c,v 1.32 2006/09/28 13:52:51 christos Exp $
+ * $NetBSD: history.c,v 1.34 2009/09/07 21:24:33 christos Exp $
*/
#if !defined(lint) && !defined(SCCSID)
@@ -116,6 +116,7 @@ private int history_prev_string(History *, HistEvent *, const char *);
*/
typedef struct hentry_t {
HistEvent ev; /* What we return */
+ void *data; /* data */
struct hentry_t *next; /* Next entry */
struct hentry_t *prev; /* Previous entry */
} hentry_t;
@@ -145,6 +146,9 @@ private int history_def_init(ptr_t *, HistEvent *, int);
private int history_def_insert(history_t *, HistEvent *, const char *);
private void history_def_delete(history_t *, HistEvent *, hentry_t *);
+private int history_deldata_nth(history_t *, HistEvent *, int, void **);
+private int history_set_nth(ptr_t, HistEvent *, int);
+
#define history_def_setsize(p, num)(void) (((history_t *)p)->max = (num))
#define history_def_getsize(p) (((history_t *)p)->cur)
#define history_def_getunique(p) (((((history_t *)p)->flags) & H_UNIQUE) != 0)
@@ -335,6 +339,31 @@ history_def_set(ptr_t p, HistEvent *ev, const int n)
}
+/* history_set_nth():
+ * Default function to set the current event in the history to the
+ * n-th one.
+ */
+private int
+history_set_nth(ptr_t p, HistEvent *ev, int n)
+{
+ history_t *h = (history_t *) p;
+
+ if (h->cur == 0) {
+ he_seterrev(ev, _HE_EMPTY_LIST);
+ return (-1);
+ }
+ for (h->cursor = h->list.prev; h->cursor != &h->list;
+ h->cursor = h->cursor->prev)
+ if (n-- <= 0)
+ break;
+ if (h->cursor == &h->list) {
+ he_seterrev(ev, _HE_NOT_FOUND);
+ return (-1);
+ }
+ return (0);
+}
+
+
/* history_def_add():
* Append string to element
*/
@@ -363,6 +392,24 @@ history_def_add(ptr_t p, HistEvent *ev, const char *str)
}
+private int
+history_deldata_nth(history_t *h, HistEvent *ev,
+ int num, void **data)
+{
+ if (history_set_nth(h, ev, num) != 0)
+ return (-1);
+ /* magic value to skip delete (just set to n-th history) */
+ if (data == (void **)-1)
+ return (0);
+ ev->str = strdup(h->cursor->ev.str);
+ ev->num = h->cursor->ev.num;
+ if (data)
+ *data = h->cursor->data;
+ history_def_delete(h, ev, h->cursor);
+ return (0);
+}
+
+
/* history_def_del():
* Delete element hp of the h list
*/
@@ -392,8 +439,11 @@ history_def_delete(history_t *h,
HistEventPrivate *evp = (void *)&hp->ev;
if (hp == &h->list)
abort();
- if (h->cursor == hp)
+ if (h->cursor == hp) {
h->cursor = hp->prev;
+ if (h->cursor == &h->list)
+ h->cursor = hp->next;
+ }
hp->prev->next = hp->next;
hp->next->prev = hp->prev;
h_free((ptr_t) evp->str);
@@ -416,6 +466,7 @@ history_def_insert(history_t *h, HistEvent *ev, const char *str)
h_free((ptr_t)h->cursor);
goto oomem;
}
+ h->cursor->data = NULL;
h->cursor->ev.num = ++h->eventid;
h->cursor->next = h->list.next;
h->cursor->prev = &h->list;
@@ -711,8 +762,8 @@ history_load(History *h, const char *fname)
(void) strunvis(ptr, line);
line[sz] = c;
if (HENTER(h, &ev, ptr) == -1) {
- h_free((ptr_t)ptr);
- return -1;
+ i = -1;
+ goto oomem;
}
}
oomem:
@@ -787,6 +838,23 @@ history_prev_event(History *h, HistEvent *ev, int num)
}
+private int
+history_next_evdata(History *h, HistEvent *ev, int num, void **d)
+{
+ int retval;
+
+ for (retval = HCURR(h, ev); retval != -1; retval = HPREV(h, ev))
+ if (num-- <= 0) {
+ if (d)
+ *d = ((history_t *)h->h_ref)->cursor->data;
+ return (0);
+ }
+
+ he_seterrev(ev, _HE_NOT_FOUND);
+ return (-1);
+}
+
+
/* history_next_event():
* Find the next event, with number given
*/
@@ -976,11 +1044,42 @@ history(History *h, HistEvent *ev, int fun, ...)
retval = 0;
break;
+ case H_NEXT_EVDATA:
+ {
+ int num = va_arg(va, int);
+ void **d = va_arg(va, void **);
+ retval = history_next_evdata(h, ev, num, d);
+ break;
+ }
+
+ case H_DELDATA:
+ {
+ int num = va_arg(va, int);
+ void **d = va_arg(va, void **);
+ retval = history_deldata_nth((history_t *)h->h_ref, ev, num, d);
+ break;
+ }
+
+ case H_REPLACE: /* only use after H_NEXT_EVDATA */
+ {
+ const char *line = va_arg(va, const char *);
+ void *d = va_arg(va, void *);
+ const char *s;
+ if(!line || !(s = strdup(line))) {
+ retval = -1;
+ break;
+ }
+ ((history_t *)h->h_ref)->cursor->ev.str = s;
+ ((history_t *)h->h_ref)->cursor->data = d;
+ retval = 0;
+ break;
+ }
+
default:
retval = -1;
he_seterrev(ev, _HE_UNKNOWN);
break;
}
va_end(va);
- return (retval);
+ return retval;
}
diff --git a/lib/libedit/key.c b/lib/libedit/key.c
index 0b9d05d..5a0b779 100644
--- a/lib/libedit/key.c
+++ b/lib/libedit/key.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $NetBSD: key.c,v 1.19 2006/03/23 20:22:51 christos Exp $
+ * $NetBSD: key.c,v 1.20 2009/02/15 21:55:23 christos Exp $
*/
#if !defined(lint) && !defined(SCCSID)
@@ -86,8 +86,8 @@ private void node__free(key_node_t *);
private void node__put(EditLine *, key_node_t *);
private int node__delete(EditLine *, key_node_t **, const char *);
private int node_lookup(EditLine *, const char *, key_node_t *,
- int);
-private int node_enum(EditLine *, key_node_t *, int);
+ size_t);
+private int node_enum(EditLine *, key_node_t *, size_t);
#define KEY_BUFSIZ EL_BUFSIZ
@@ -478,9 +478,9 @@ node__free(key_node_t *k)
* Print if last node
*/
private int
-node_lookup(EditLine *el, const char *str, key_node_t *ptr, int cnt)
+node_lookup(EditLine *el, const char *str, key_node_t *ptr, size_t cnt)
{
- int ncnt;
+ size_t ncnt;
if (ptr == NULL)
return (-1); /* cannot have null ptr */
@@ -493,7 +493,8 @@ node_lookup(EditLine *el, const char *str, key_node_t *ptr, int cnt)
/* If match put this char into el->el_key.buf. Recurse */
if (ptr->ch == *str) {
/* match found */
- ncnt = key__decode_char(el->el_key.buf, KEY_BUFSIZ, cnt,
+ ncnt = key__decode_char(el->el_key.buf,
+ (size_t)KEY_BUFSIZ, cnt,
(unsigned char) ptr->ch);
if (ptr->next != NULL)
/* not yet at leaf */
@@ -527,9 +528,9 @@ node_lookup(EditLine *el, const char *str, key_node_t *ptr, int cnt)
* Traverse the node printing the characters it is bound in buffer
*/
private int
-node_enum(EditLine *el, key_node_t *ptr, int cnt)
+node_enum(EditLine *el, key_node_t *ptr, size_t cnt)
{
- int ncnt;
+ size_t ncnt;
if (cnt >= KEY_BUFSIZ - 5) { /* buffer too small */
el->el_key.buf[++cnt] = '"';
@@ -547,7 +548,7 @@ node_enum(EditLine *el, key_node_t *ptr, int cnt)
return (-1);
}
/* put this char at end of str */
- ncnt = key__decode_char(el->el_key.buf, KEY_BUFSIZ, cnt,
+ ncnt = key__decode_char(el->el_key.buf, (size_t)KEY_BUFSIZ, cnt,
(unsigned char)ptr->ch);
if (ptr->next == NULL) {
/* print this key and function */
@@ -615,8 +616,8 @@ key_kprint(EditLine *el, const char *key, key_value_t *val, int ntype)
/* key__decode_char():
* Put a printable form of char in buf.
*/
-protected int
-key__decode_char(char *buf, int cnt, int off, int ch)
+protected size_t
+key__decode_char(char *buf, size_t cnt, size_t off, int ch)
{
char *sb = buf + off;
char *eb = buf + cnt;
@@ -626,7 +627,7 @@ key__decode_char(char *buf, int cnt, int off, int ch)
if (ch == 0) {
ADDC('^');
ADDC('@');
- return b - sb;
+ return (int)(b - sb);
}
if (iscntrl(ch)) {
ADDC('^');
@@ -648,15 +649,15 @@ key__decode_char(char *buf, int cnt, int off, int ch)
ADDC((((unsigned int) ch >> 3) & 7) + '0');
ADDC((ch & 7) + '0');
}
- return b - sb;
+ return (size_t)(b - sb);
}
/* key__decode_str():
* Make a printable version of the ey
*/
-protected int
-key__decode_str(const char *str, char *buf, int len, const char *sep)
+protected size_t
+key__decode_str(const char *str, char *buf, size_t len, const char *sep)
{
char *b = buf, *eb = b + len;
const char *p;
@@ -699,7 +700,7 @@ key__decode_str(const char *str, char *buf, int len, const char *sep)
}
done:
ADDC('\0');
- if (b - buf >= len)
+ if ((size_t)(b - buf) >= len)
buf[len - 1] = '\0';
- return b - buf;
+ return (size_t)(b - buf);
}
diff --git a/lib/libedit/key.h b/lib/libedit/key.h
index 3a21292..1997adc 100644
--- a/lib/libedit/key.h
+++ b/lib/libedit/key.h
@@ -76,8 +76,8 @@ protected int key_delete(EditLine *, const char *);
protected void key_print(EditLine *, const char *);
protected void key_kprint(EditLine *, const char *, key_value_t *,
int);
-protected int key__decode_str(const char *, char *, int,
+protected size_t key__decode_str(const char *, char *, size_t,
const char *);
-protected int key__decode_char(char *, int, int, int);
+protected size_t key__decode_char(char *, size_t, size_t, int);
#endif /* _h_el_key */
diff --git a/lib/libedit/makelist b/lib/libedit/makelist
index e44a0e7..6bb2476 100644
--- a/lib/libedit/makelist
+++ b/lib/libedit/makelist
@@ -1,5 +1,5 @@
#!/bin/sh -
-# $NetBSD: makelist,v 1.10 2005/08/08 14:04:49 christos Exp $
+# $NetBSD: makelist,v 1.11 2005/10/22 16:45:03 christos Exp $
# $FreeBSD$
#
# Copyright (c) 1992, 1993
@@ -141,7 +141,7 @@ case $FLAG in
#
-fh)
cat $FILES | $AWK '/el_action_t/ { print $3 }' | \
- sort | LC_ALL=C tr 'a-z' 'A-Z' | $AWK '
+ sort | LC_ALL=C tr '[:lower:]' '[:upper:]' | $AWK '
BEGIN {
printf("/* Automatically generated file, do not edit */\n");
printf("#ifndef _h_fcns_c\n#define _h_fcns_c\n");
diff --git a/lib/libedit/prompt.c b/lib/libedit/prompt.c
index 3d72da7..76d2d64 100644
--- a/lib/libedit/prompt.c
+++ b/lib/libedit/prompt.c
@@ -85,14 +85,23 @@ prompt_print(EditLine *el, int op)
{
el_prompt_t *elp;
char *p;
+ int ignore = 0;
if (op == EL_PROMPT)
elp = &el->el_prompt;
else
elp = &el->el_rprompt;
- p = (elp->p_func) (el);
- while (*p)
- re_putc(el, *p++, 1);
+
+ for (p = (*elp->p_func)(el); *p; p++) {
+ if (elp->p_ignore == *p) {
+ ignore = !ignore;
+ continue;
+ }
+ if (ignore)
+ term__putc(el, *p);
+ else
+ re_putc(el, *p, 1);
+ }
elp->p_pos.v = el->el_refresh.r_cursor.v;
elp->p_pos.h = el->el_refresh.r_cursor.h;
@@ -109,10 +118,12 @@ prompt_init(EditLine *el)
el->el_prompt.p_func = prompt_default;
el->el_prompt.p_pos.v = 0;
el->el_prompt.p_pos.h = 0;
+ el->el_prompt.p_ignore = '\0';
el->el_rprompt.p_func = prompt_default_r;
el->el_rprompt.p_pos.v = 0;
el->el_rprompt.p_pos.h = 0;
- return (0);
+ el->el_rprompt.p_ignore = '\0';
+ return 0;
}
@@ -130,24 +141,29 @@ prompt_end(EditLine *el __unused)
* Install a prompt printing function
*/
protected int
-prompt_set(EditLine *el, el_pfunc_t prf, int op)
+prompt_set(EditLine *el, el_pfunc_t prf, char c, int op)
{
el_prompt_t *p;
- if (op == EL_PROMPT)
+ if (op == EL_PROMPT || op == EL_PROMPT_ESC)
p = &el->el_prompt;
else
p = &el->el_rprompt;
+
if (prf == NULL) {
- if (op == EL_PROMPT)
+ if (op == EL_PROMPT || op == EL_PROMPT_ESC)
p->p_func = prompt_default;
else
p->p_func = prompt_default_r;
} else
p->p_func = prf;
+
+ p->p_ignore = c;
+
p->p_pos.v = 0;
p->p_pos.h = 0;
- return (0);
+
+ return 0;
}
@@ -155,14 +171,22 @@ prompt_set(EditLine *el, el_pfunc_t prf, int op)
* Retrieve the prompt printing function
*/
protected int
-prompt_get(EditLine *el, el_pfunc_t *prf, int op)
+prompt_get(EditLine *el, el_pfunc_t *prf, char *c, int op)
{
+ el_prompt_t *p;
if (prf == NULL)
- return (-1);
+ return -1;
+
if (op == EL_PROMPT)
- *prf = el->el_prompt.p_func;
+ p = &el->el_prompt;
else
- *prf = el->el_rprompt.p_func;
- return (0);
+ p = &el->el_rprompt;
+
+ *prf = el->el_rprompt.p_func;
+
+ if (c)
+ *c = p->p_ignore;
+
+ return 0;
}
diff --git a/lib/libedit/prompt.h b/lib/libedit/prompt.h
index 6523add..fe69ca4 100644
--- a/lib/libedit/prompt.h
+++ b/lib/libedit/prompt.h
@@ -47,11 +47,13 @@ typedef char * (*el_pfunc_t)(EditLine*);
typedef struct el_prompt_t {
el_pfunc_t p_func; /* Function to return the prompt */
coord_t p_pos; /* position in the line after prompt */
+ char p_ignore; /* character to start/end literal
+*/
} el_prompt_t;
protected void prompt_print(EditLine *, int);
-protected int prompt_set(EditLine *, el_pfunc_t, int);
-protected int prompt_get(EditLine *, el_pfunc_t *, int);
+protected int prompt_set(EditLine *, el_pfunc_t, char, int);
+protected int prompt_get(EditLine *, el_pfunc_t *, char *, int);
protected int prompt_init(EditLine *);
protected void prompt_end(EditLine *);
diff --git a/lib/libedit/read.c b/lib/libedit/read.c
index 0caba5d..f0b5ef3 100644
--- a/lib/libedit/read.c
+++ b/lib/libedit/read.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $NetBSD: read.c,v 1.40 2007/03/01 21:41:45 christos Exp $
+ * $NetBSD: read.c,v 1.52 2009/07/22 15:57:00 christos Exp $
*/
#if !defined(lint) && !defined(SCCSID)
@@ -222,7 +222,7 @@ el_push(EditLine *el, const char *str)
ma->level--;
}
term_beep(el);
- term__flush();
+ term__flush(el);
}
@@ -235,9 +235,12 @@ read_getcmd(EditLine *el, el_action_t *cmdnum, char *ch)
el_action_t cmd;
int num;
+ el->el_errno = 0;
do {
- if ((num = el_getc(el, ch)) != 1) /* if EOF or error */
+ if ((num = el_getc(el, ch)) != 1) { /* if EOF or error */
+ el->el_errno = num == 0 ? 0 : errno;
return (num);
+ }
#ifdef KANJI
if ((*ch & 0200)) {
@@ -286,18 +289,25 @@ read_getcmd(EditLine *el, el_action_t *cmdnum, char *ch)
private int
read_char(EditLine *el, char *cp)
{
- int num_read;
+ ssize_t num_read;
int tried = 0;
- while ((num_read = read(el->el_infd, cp, 1)) == -1)
+ again:
+ el->el_signal->sig_no = 0;
+ while ((num_read = read(el->el_infd, cp, 1)) == -1) {
+ if (el->el_signal->sig_no == SIGCONT) {
+ sig_set(el);
+ el_set(el, EL_REFRESH);
+ goto again;
+ }
if (!tried && read__fixio(el->el_infd, errno) == 0)
tried = 1;
else {
*cp = '\0';
return (-1);
}
-
- return (num_read);
+ }
+ return (int)num_read;
}
/* read_pop():
@@ -309,8 +319,9 @@ read_pop(c_macro_t *ma)
int i;
el_free(ma->macro[0]);
- for (i = ma->level--; i > 0; i--)
- ma->macro[i - 1] = ma->macro[i];
+ for (i = 0; i < ma->level; i++)
+ ma->macro[i] = ma->macro[i + 1];
+ ma->level--;
ma->offset = 0;
}
@@ -323,7 +334,7 @@ el_getc(EditLine *el, char *cp)
int num_read;
c_macro_t *ma = &el->el_chared.c_macro;
- term__flush();
+ term__flush(el);
for (;;) {
if (ma->level < 0) {
if (!read_preread(el))
@@ -382,7 +393,7 @@ read_prepare(EditLine *el)
re_refresh(el); /* print the prompt */
if (el->el_flags & UNBUFFERED)
- term__flush();
+ term__flush(el);
}
protected void
@@ -402,15 +413,20 @@ el_gets(EditLine *el, int *nread)
int num; /* how many chars we have read at NL */
char ch;
int crlf = 0;
+ int nrb;
#ifdef FIONREAD
c_macro_t *ma = &el->el_chared.c_macro;
#endif /* FIONREAD */
+ if (nread == NULL)
+ nread = &nrb;
+ *nread = 0;
+
if (el->el_flags & NO_TTY) {
char *cp = el->el_line.buffer;
size_t idx;
- while ((*el->el_read.read_char)(el, cp) == 1) {
+ while ((num = (*el->el_read.read_char)(el, cp)) == 1) {
/* make sure there is space for next character */
if (cp + 1 >= el->el_line.limit) {
idx = (cp - el->el_line.buffer);
@@ -424,12 +440,13 @@ el_gets(EditLine *el, int *nread)
if (cp[-1] == '\r' || cp[-1] == '\n')
break;
}
+ if (num == -1)
+ el->el_errno = errno;
el->el_line.cursor = el->el_line.lastchar = cp;
*cp = '\0';
- if (nread)
- *nread = el->el_line.cursor - el->el_line.buffer;
- return (el->el_line.buffer);
+ *nread = (int)(el->el_line.cursor - el->el_line.buffer);
+ goto done;
}
@@ -440,8 +457,8 @@ el_gets(EditLine *el, int *nread)
(void) ioctl(el->el_infd, FIONREAD, (ioctl_t) & chrs);
if (chrs == 0) {
if (tty_rawmode(el) < 0) {
- if (nread)
- *nread = 0;
+ errno = 0;
+ *nread = 0;
return (NULL);
}
}
@@ -454,14 +471,15 @@ el_gets(EditLine *el, int *nread)
if (el->el_flags & EDIT_DISABLED) {
char *cp;
size_t idx;
+
if ((el->el_flags & UNBUFFERED) == 0)
cp = el->el_line.buffer;
else
cp = el->el_line.lastchar;
- term__flush();
+ term__flush(el);
- while ((*el->el_read.read_char)(el, cp) == 1) {
+ while ((num = (*el->el_read.read_char)(el, cp)) == 1) {
/* make sure there is space next character */
if (cp + 1 >= el->el_line.limit) {
idx = (cp - el->el_line.buffer);
@@ -469,8 +487,6 @@ el_gets(EditLine *el, int *nread)
break;
cp = &el->el_line.buffer[idx];
}
- if (*cp == 4) /* ought to be stty eof */
- break;
cp++;
crlf = cp[-1] == '\r' || cp[-1] == '\n';
if (el->el_flags & UNBUFFERED)
@@ -479,11 +495,13 @@ el_gets(EditLine *el, int *nread)
break;
}
+ if (num == -1) {
+ el->el_errno = errno;
+ }
+
el->el_line.cursor = el->el_line.lastchar = cp;
*cp = '\0';
- if (nread)
- *nread = el->el_line.cursor - el->el_line.buffer;
- return (el->el_line.buffer);
+ goto done;
}
for (num = OKCMD; num == OKCMD;) { /* while still editing this
@@ -499,7 +517,7 @@ el_gets(EditLine *el, int *nread)
#endif /* DEBUG_READ */
break;
}
- if ((unsigned int)cmdnum >= el->el_map.nfunc) { /* BUG CHECK command */
+ if ((unsigned int)cmdnum >= (unsigned int)el->el_map.nfunc) { /* BUG CHECK command */
#ifdef DEBUG_EDIT
(void) fprintf(el->el_errfile,
"ERROR: illegal command from key 0%o\r\n", ch);
@@ -581,7 +599,7 @@ el_gets(EditLine *el, int *nread)
break;
case CC_NEWLINE: /* normal end of line */
- num = el->el_line.lastchar - el->el_line.buffer;
+ num = (int)(el->el_line.lastchar - el->el_line.buffer);
break;
case CC_FATAL: /* fatal error, reset to known state */
@@ -602,7 +620,7 @@ el_gets(EditLine *el, int *nread)
"*** editor ERROR ***\r\n\n");
#endif /* DEBUG_READ */
term_beep(el);
- term__flush();
+ term__flush(el);
break;
}
el->el_state.argument = 1;
@@ -612,15 +630,21 @@ el_gets(EditLine *el, int *nread)
break;
}
- term__flush(); /* flush any buffered output */
+ term__flush(el); /* flush any buffered output */
/* make sure the tty is set up correctly */
if ((el->el_flags & UNBUFFERED) == 0) {
read_finish(el);
- if (nread)
- *nread = num;
+ *nread = num != -1 ? num : 0;
} else {
- if (nread)
- *nread = el->el_line.lastchar - el->el_line.buffer;
+ *nread = (int)(el->el_line.lastchar - el->el_line.buffer);
}
- return (num ? el->el_line.buffer : NULL);
+done:
+ if (*nread == 0) {
+ if (num == -1) {
+ *nread = -1;
+ errno = el->el_errno;
+ }
+ return NULL;
+ } else
+ return el->el_line.buffer;
}
diff --git a/lib/libedit/refresh.c b/lib/libedit/refresh.c
index 22e1de4..8fe8229 100644
--- a/lib/libedit/refresh.c
+++ b/lib/libedit/refresh.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $NetBSD: refresh.c,v 1.27 2005/11/09 22:11:10 christos Exp $
+ * $NetBSD: refresh.c,v 1.34 2009/12/28 22:15:36 christos Exp $
*/
#if !defined(lint) && !defined(SCCSID)
@@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$");
#include "el.h"
+private void re_nextline(EditLine *);
private void re_addc(EditLine *, int);
private void re_update_line(EditLine *, char *, char *, int);
private void re_insert (EditLine *, char *, int, int, char *, int);
@@ -86,6 +87,37 @@ re_printstr(EditLine *el, const char *str, char *f, char *t)
#define ELRE_DEBUG(a, b)
#endif
+/* re_nextline():
+ * Move to the next line or scroll
+ */
+private void
+re_nextline(EditLine *el)
+{
+ el->el_refresh.r_cursor.h = 0; /* reset it. */
+
+ /*
+ * If we would overflow (input is longer than terminal size),
+ * emulate scroll by dropping first line and shuffling the rest.
+ * We do this via pointer shuffling - it's safe in this case
+ * and we avoid memcpy().
+ */
+ if (el->el_refresh.r_cursor.v + 1 >= el->el_term.t_size.v) {
+ int i, lins = el->el_term.t_size.v;
+ char *firstline = el->el_vdisplay[0];
+
+ for(i = 1; i < lins; i++)
+ el->el_vdisplay[i - 1] = el->el_vdisplay[i];
+
+ firstline[0] = '\0'; /* empty the string */
+ el->el_vdisplay[i - 1] = firstline;
+ } else
+ el->el_refresh.r_cursor.v++;
+
+ ELRE_ASSERT(el->el_refresh.r_cursor.v >= el->el_term.t_size.v,
+ (__F, "\r\nre_putc: overflow! r_cursor.v == %d > %d\r\n",
+ el->el_refresh.r_cursor.v, el->el_term.t_size.v),
+ abort());
+}
/* re_addc():
* Draw c, expanding tabs, control chars etc.
@@ -101,10 +133,8 @@ re_addc(EditLine *el, int c)
if (c == '\n') { /* expand the newline */
int oldv = el->el_refresh.r_cursor.v;
re_putc(el, '\0', 0); /* assure end of line */
- if (oldv == el->el_refresh.r_cursor.v) { /* XXX */
- el->el_refresh.r_cursor.h = 0; /* reset cursor pos */
- el->el_refresh.r_cursor.v++;
- }
+ if (oldv == el->el_refresh.r_cursor.v) /* XXX */
+ re_nextline(el);
return;
}
if (c == '\t') { /* expand the tab */
@@ -144,33 +174,12 @@ re_putc(EditLine *el, int c, int shift)
el->el_refresh.r_cursor.h++; /* advance to next place */
if (el->el_refresh.r_cursor.h >= el->el_term.t_size.h) {
- el->el_vdisplay[el->el_refresh.r_cursor.v][el->el_term.t_size.h] = '\0';
/* assure end of line */
- el->el_refresh.r_cursor.h = 0; /* reset it. */
-
- /*
- * If we would overflow (input is longer than terminal size),
- * emulate scroll by dropping first line and shuffling the rest.
- * We do this via pointer shuffling - it's safe in this case
- * and we avoid memcpy().
- */
- if (el->el_refresh.r_cursor.v + 1 >= el->el_term.t_size.v) {
- int i, lins = el->el_term.t_size.v;
- char *firstline = el->el_vdisplay[0];
-
- for(i=1; i < lins; i++)
- el->el_vdisplay[i-1] = el->el_vdisplay[i];
-
- firstline[0] = '\0'; /* empty the string */
- el->el_vdisplay[i-1] = firstline;
- } else
- el->el_refresh.r_cursor.v++;
-
- ELRE_ASSERT(el->el_refresh.r_cursor.v >= el->el_term.t_size.v,
- (__F, "\r\nre_putc: overflow! r_cursor.v == %d > %d\r\n",
- el->el_refresh.r_cursor.v, el->el_term.t_size.v),
- abort());
+ el->el_vdisplay[el->el_refresh.r_cursor.v][el->el_term.t_size.h]
+ = '\0';
+ re_nextline(el);
}
+
}
@@ -298,7 +307,7 @@ re_refresh(EditLine *el)
term_move_to_char(el, 0);
term_clear_EOL(el, (int) strlen(el->el_display[i]));
#ifdef DEBUG_REFRESH
- term_overwrite(el, "C\b", 2);
+ term_overwrite(el, "C\b", (size_t)2);
#endif /* DEBUG_REFRESH */
el->el_display[i][0] = '\0';
}
@@ -321,9 +330,9 @@ re_goto_bottom(EditLine *el)
{
term_move_to_line(el, el->el_refresh.r_oldcv);
- term__putc('\n');
+ term__putc(el, '\n');
re_clear_display(el);
- term__flush();
+ term__flush(el);
}
@@ -475,6 +484,7 @@ re_update_line(EditLine *el, char *old, char *new, int i)
char *ofd, *ols, *oe, *nfd, *nls, *ne;
char *osb, *ose, *nsb, *nse;
int fx, sx;
+ size_t len;
/*
* find first diff
@@ -601,12 +611,12 @@ re_update_line(EditLine *el, char *old, char *new, int i)
* fx is the number of characters we need to insert/delete: in the
* beginning to bring the two same begins together
*/
- fx = (nsb - nfd) - (osb - ofd);
+ fx = (int)((nsb - nfd) - (osb - ofd));
/*
* sx is the number of characters we need to insert/delete: in the
* end to bring the two same last parts together
*/
- sx = (nls - nse) - (ols - ose);
+ sx = (int)((nls - nse) - (ols - ose));
if (!EL_CAN_INSERT) {
if (fx > 0) {
@@ -655,8 +665,8 @@ re_update_line(EditLine *el, char *old, char *new, int i)
/*
* Now that we are done with pragmatics we recompute fx, sx
*/
- fx = (nsb - nfd) - (osb - ofd);
- sx = (nls - nse) - (ols - ose);
+ fx = (int)((nsb - nfd) - (osb - ofd));
+ sx = (int)((nls - nse) - (ols - ose));
ELRE_DEBUG(1, (__F, "fx %d, sx %d\n", fx, sx));
ELRE_DEBUG(1, (__F, "ofd %d, osb %d, ose %d, ols %d, oe %d\n",
@@ -739,7 +749,7 @@ re_update_line(EditLine *el, char *old, char *new, int i)
/*
* Move to the first char to insert, where the first diff is.
*/
- term_move_to_char(el, nfd - new);
+ term_move_to_char(el, (int)(nfd - new));
/*
* Check if we have stuff to keep at end
*/
@@ -752,20 +762,21 @@ re_update_line(EditLine *el, char *old, char *new, int i)
ELRE_DEBUG(!EL_CAN_INSERT, (__F,
"ERROR: cannot insert in early first diff\n"));
term_insertwrite(el, nfd, fx);
- re_insert(el, old, ofd - old,
+ re_insert(el, old, (int)(ofd - old),
el->el_term.t_size.h, nfd, fx);
}
/*
* write (nsb-nfd) - fx chars of new starting at
* (nfd + fx)
*/
- term_overwrite(el, nfd + fx, (nsb - nfd) - fx);
- re__strncopy(ofd + fx, nfd + fx,
- (size_t) ((nsb - nfd) - fx));
+ len = (size_t) ((nsb - nfd) - fx);
+ term_overwrite(el, (nfd + fx), len);
+ re__strncopy(ofd + fx, nfd + fx, len);
} else {
ELRE_DEBUG(1, (__F, "without anything to save\r\n"));
- term_overwrite(el, nfd, (nsb - nfd));
- re__strncopy(ofd, nfd, (size_t) (nsb - nfd));
+ len = (size_t)(nsb - nfd);
+ term_overwrite(el, nfd, len);
+ re__strncopy(ofd, nfd, len);
/*
* Done
*/
@@ -777,7 +788,7 @@ re_update_line(EditLine *el, char *old, char *new, int i)
/*
* move to the first char to delete where the first diff is
*/
- term_move_to_char(el, ofd - old);
+ term_move_to_char(el, (int)(ofd - old));
/*
* Check if we have stuff to save
*/
@@ -791,14 +802,15 @@ re_update_line(EditLine *el, char *old, char *new, int i)
ELRE_DEBUG(!EL_CAN_DELETE, (__F,
"ERROR: cannot delete in first diff\n"));
term_deletechars(el, -fx);
- re_delete(el, old, ofd - old,
+ re_delete(el, old, (int)(ofd - old),
el->el_term.t_size.h, -fx);
}
/*
* write (nsb-nfd) chars of new starting at nfd
*/
- term_overwrite(el, nfd, (nsb - nfd));
- re__strncopy(ofd, nfd, (size_t) (nsb - nfd));
+ len = (size_t) (nsb - nfd);
+ term_overwrite(el, nfd, len);
+ re__strncopy(ofd, nfd, len);
} else {
ELRE_DEBUG(1, (__F,
@@ -806,8 +818,9 @@ re_update_line(EditLine *el, char *old, char *new, int i)
/*
* write (nsb-nfd) chars of new starting at nfd
*/
- term_overwrite(el, nfd, (nsb - nfd));
- re_clear_eol(el, fx, sx, (oe - old) - (ne - new));
+ term_overwrite(el, nfd, (size_t)(nsb - nfd));
+ re_clear_eol(el, fx, sx,
+ (int)((oe - old) - (ne - new)));
/*
* Done
*/
@@ -826,7 +839,7 @@ re_update_line(EditLine *el, char *old, char *new, int i)
* fx is the number of characters inserted (+) or deleted (-)
*/
- term_move_to_char(el, (ose - old) + fx);
+ term_move_to_char(el, (int)((ose - old) + fx));
/*
* Check if we have stuff to save
*/
@@ -843,12 +856,13 @@ re_update_line(EditLine *el, char *old, char *new, int i)
/*
* write (nls-nse) chars of new starting at nse
*/
- term_overwrite(el, nse, (nls - nse));
+ term_overwrite(el, nse, (size_t)(nls - nse));
} else {
ELRE_DEBUG(1, (__F,
"but with nothing left to save\r\n"));
- term_overwrite(el, nse, (nls - nse));
- re_clear_eol(el, fx, sx, (oe - old) - (ne - new));
+ term_overwrite(el, nse, (size_t)(nls - nse));
+ re_clear_eol(el, fx, sx,
+ (int)((oe - old) - (ne - new)));
}
}
/*
@@ -858,7 +872,7 @@ re_update_line(EditLine *el, char *old, char *new, int i)
ELRE_DEBUG(1, (__F, "late first diff insert at %d...\r\n",
nfd - new));
- term_move_to_char(el, nfd - new);
+ term_move_to_char(el, (int)(nfd - new));
/*
* Check if we have stuff to keep at the end
*/
@@ -869,7 +883,7 @@ re_update_line(EditLine *el, char *old, char *new, int i)
* to zero above as a flag saying that we hadn't done
* an early first insert.
*/
- fx = (nsb - nfd) - (osb - ofd);
+ fx = (int)((nsb - nfd) - (osb - ofd));
if (fx > 0) {
/*
* insert fx chars of new starting at nfd
@@ -877,20 +891,21 @@ re_update_line(EditLine *el, char *old, char *new, int i)
ELRE_DEBUG(!EL_CAN_INSERT, (__F,
"ERROR: cannot insert in late first diff\n"));
term_insertwrite(el, nfd, fx);
- re_insert(el, old, ofd - old,
+ re_insert(el, old, (int)(ofd - old),
el->el_term.t_size.h, nfd, fx);
}
/*
* write (nsb-nfd) - fx chars of new starting at
* (nfd + fx)
*/
- term_overwrite(el, nfd + fx, (nsb - nfd) - fx);
- re__strncopy(ofd + fx, nfd + fx,
- (size_t) ((nsb - nfd) - fx));
+ len = (size_t) ((nsb - nfd) - fx);
+ term_overwrite(el, (nfd + fx), len);
+ re__strncopy(ofd + fx, nfd + fx, len);
} else {
ELRE_DEBUG(1, (__F, "without anything to save\r\n"));
- term_overwrite(el, nfd, (nsb - nfd));
- re__strncopy(ofd, nfd, (size_t) (nsb - nfd));
+ len = (size_t) (nsb - nfd);
+ term_overwrite(el, nfd, len);
+ re__strncopy(ofd, nfd, len);
}
}
/*
@@ -898,8 +913,8 @@ re_update_line(EditLine *el, char *old, char *new, int i)
*/
if (sx >= 0) {
ELRE_DEBUG(1, (__F,
- "second diff insert at %d...\r\n", nse - new));
- term_move_to_char(el, nse - new);
+ "second diff insert at %d...\r\n", (int)(nse - new)));
+ term_move_to_char(el, (int)(nse - new));
if (ols != oe) {
ELRE_DEBUG(1, (__F, "with stuff to keep at end\r\n"));
if (sx > 0) {
@@ -912,10 +927,11 @@ re_update_line(EditLine *el, char *old, char *new, int i)
* write (nls-nse) - sx chars of new starting at
* (nse + sx)
*/
- term_overwrite(el, nse + sx, (nls - nse) - sx);
+ term_overwrite(el, (nse + sx),
+ (size_t)((nls - nse) - sx));
} else {
ELRE_DEBUG(1, (__F, "without anything to save\r\n"));
- term_overwrite(el, nse, (nls - nse));
+ term_overwrite(el, nse, (size_t)(nls - nse));
/*
* No need to do a clear-to-end here because we were
@@ -974,34 +990,28 @@ re_refresh_cursor(EditLine *el)
/* do input buffer to el->el_line.cursor */
for (cp = el->el_line.buffer; cp < el->el_line.cursor; cp++) {
c = *cp;
- h++; /* all chars at least this long */
- if (c == '\n') {/* handle newline in data part too */
+ switch (c) {
+ case '\n': /* handle newline in data part too */
h = 0;
v++;
- } else {
- if (c == '\t') { /* if a tab, to next tab stop */
- while (h & 07) {
- h++;
- }
- } else if (iscntrl((unsigned char) c)) {
- /* if control char */
+ break;
+ case '\t': /* if a tab, to next tab stop */
+ while (++h & 07)
+ continue;
+ break;
+ default:
+ if (iscntrl((unsigned char) c))
+ h += 2; /* ^x */
+ else if (!isprint((unsigned char) c))
+ h += 4; /* octal \xxx */
+ else
h++;
- if (h > th) { /* if overflow, compensate */
- h = 1;
- v++;
- }
- } else if (!isprint((unsigned char) c)) {
- h += 3;
- if (h > th) { /* if overflow, compensate */
- h = h - th;
- v++;
- }
- }
+ break;
}
if (h >= th) { /* check, extra long tabs picked up here also */
- h = 0;
+ h -= th;
v++;
}
}
@@ -1009,7 +1019,7 @@ re_refresh_cursor(EditLine *el)
/* now go there */
term_move_to_line(el, v);
term_move_to_char(el, h);
- term__flush();
+ term__flush(el);
}
@@ -1020,7 +1030,7 @@ private void
re_fastputc(EditLine *el, int c)
{
- term__putc(c);
+ term__putc(el, c);
el->el_display[el->el_cursor.v][el->el_cursor.h++] = c;
if (el->el_cursor.h >= el->el_term.t_size.h) {
/* if we must overflow */
@@ -1036,23 +1046,23 @@ re_fastputc(EditLine *el, int c)
int i, lins = el->el_term.t_size.v;
char *firstline = el->el_display[0];
- for(i=1; i < lins; i++)
- el->el_display[i-1] = el->el_display[i];
+ for(i = 1; i < lins; i++)
+ el->el_display[i - 1] = el->el_display[i];
re__copy_and_pad(firstline, "", 0);
- el->el_display[i-1] = firstline;
+ el->el_display[i - 1] = firstline;
} else {
el->el_cursor.v++;
el->el_refresh.r_oldcv++;
}
if (EL_HAS_AUTO_MARGINS) {
if (EL_HAS_MAGIC_MARGINS) {
- term__putc(' ');
- term__putc('\b');
+ term__putc(el, ' ');
+ term__putc(el, '\b');
}
} else {
- term__putc('\r');
- term__putc('\n');
+ term__putc(el, '\r');
+ term__putc(el, '\n');
}
}
}
@@ -1092,7 +1102,7 @@ re_fastaddc(EditLine *el)
re_fastputc(el, (int)(((((unsigned int)c) >> 3) & 7) + '0'));
re_fastputc(el, (c & 7) + '0');
}
- term__flush();
+ term__flush(el);
}
@@ -1121,17 +1131,16 @@ re_clear_lines(EditLine *el)
if (EL_CAN_CEOL) {
int i;
- term_move_to_char(el, 0);
- for (i = 0; i <= el->el_refresh.r_oldcv; i++) {
+ for (i = el->el_refresh.r_oldcv; i >= 0; i--) {
/* for each line on the screen */
term_move_to_line(el, i);
+ term_move_to_char(el, 0);
term_clear_EOL(el, el->el_term.t_size.h);
}
- term_move_to_line(el, 0);
} else {
term_move_to_line(el, el->el_refresh.r_oldcv);
/* go to last line */
- term__putc('\r'); /* go to BOL */
- term__putc('\n'); /* go to new line */
+ term__putc(el, '\r'); /* go to BOL */
+ term__putc(el, '\n'); /* go to new line */
}
}
diff --git a/lib/libedit/search.c b/lib/libedit/search.c
index 991bad2..af3da8c 100644
--- a/lib/libedit/search.c
+++ b/lib/libedit/search.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $NetBSD: search.c,v 1.20 2004/11/04 01:16:03 christos Exp $
+ * $NetBSD: search.c,v 1.21 2009/02/15 21:55:23 christos Exp $
*/
#if !defined(lint) && !defined(SCCSID)
@@ -207,7 +207,7 @@ ce_inc_search(EditLine *el, int dir)
el_action_t ret = CC_NORM;
int ohisteventno = el->el_history.eventno;
- int oldpatlen = el->el_search.patlen;
+ size_t oldpatlen = el->el_search.patlen;
int newdir = dir;
int done, redo;
diff --git a/lib/libedit/sig.c b/lib/libedit/sig.c
index a895aea..e48dbef 100644
--- a/lib/libedit/sig.c
+++ b/lib/libedit/sig.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $NetBSD: sig.c,v 1.11 2003/08/07 16:44:33 agc Exp $
+ * $NetBSD: sig.c,v 1.15 2009/02/19 15:20:22 christos Exp $
*/
#if !defined(lint) && !defined(SCCSID)
@@ -73,12 +73,14 @@ sig_handler(int signo)
(void) sigaddset(&nset, signo);
(void) sigprocmask(SIG_BLOCK, &nset, &oset);
+ sel->el_signal->sig_no = signo;
+
switch (signo) {
case SIGCONT:
tty_rawmode(sel);
if (ed_redisplay(sel, 0) == CC_REFRESH)
re_refresh(sel);
- term__flush();
+ term__flush(sel);
break;
case SIGWINCH:
@@ -94,7 +96,10 @@ sig_handler(int signo)
if (signo == sighdl[i])
break;
- (void) signal(signo, sel->el_signal[i]);
+ (void) sigaction(signo, &sel->el_signal->sig_action[i], NULL);
+ sel->el_signal->sig_action[i].sa_handler = SIG_ERR;
+ sel->el_signal->sig_action[i].sa_flags = 0;
+ sigemptyset(&sel->el_signal->sig_action[i].sa_mask);
(void) sigprocmask(SIG_SETMASK, &oset, NULL);
(void) kill(0, signo);
}
@@ -106,26 +111,29 @@ sig_handler(int signo)
protected int
sig_init(EditLine *el)
{
- int i;
- sigset_t nset, oset;
+ size_t i;
+ sigset_t *nset, oset;
- (void) sigemptyset(&nset);
-#define _DO(a) (void) sigaddset(&nset, a);
+ el->el_signal = el_malloc(sizeof(*el->el_signal));
+ if (el->el_signal == NULL)
+ return -1;
+
+ nset = &el->el_signal->sig_set;
+ (void) sigemptyset(nset);
+#define _DO(a) (void) sigaddset(nset, a);
ALLSIGS
#undef _DO
- (void) sigprocmask(SIG_BLOCK, &nset, &oset);
+ (void) sigprocmask(SIG_BLOCK, nset, &oset);
-#define SIGSIZE (sizeof(sighdl) / sizeof(sighdl[0]) * sizeof(el_signalhandler_t))
-
- el->el_signal = (el_signalhandler_t *) el_malloc(SIGSIZE);
- if (el->el_signal == NULL)
- return (-1);
- for (i = 0; sighdl[i] != -1; i++)
- el->el_signal[i] = SIG_ERR;
+ for (i = 0; sighdl[i] != -1; i++) {
+ el->el_signal->sig_action[i].sa_handler = SIG_ERR;
+ el->el_signal->sig_action[i].sa_flags = 0;
+ sigemptyset(&el->el_signal->sig_action[i].sa_mask);
+ }
(void) sigprocmask(SIG_SETMASK, &oset, NULL);
- return (0);
+ return 0;
}
@@ -147,20 +155,21 @@ sig_end(EditLine *el)
protected void
sig_set(EditLine *el)
{
- int i;
- sigset_t nset, oset;
+ size_t i;
+ sigset_t oset;
+ struct sigaction osa, nsa;
- (void) sigemptyset(&nset);
-#define _DO(a) (void) sigaddset(&nset, a);
- ALLSIGS
-#undef _DO
- (void) sigprocmask(SIG_BLOCK, &nset, &oset);
+ nsa.sa_handler = sig_handler;
+ nsa.sa_flags = 0;
+ sigemptyset(&nsa.sa_mask);
+
+ (void) sigprocmask(SIG_BLOCK, &el->el_signal->sig_set, &oset);
for (i = 0; sighdl[i] != -1; i++) {
- el_signalhandler_t s;
/* This could happen if we get interrupted */
- if ((s = signal(sighdl[i], sig_handler)) != sig_handler)
- el->el_signal[i] = s;
+ if (sigaction(sighdl[i], &nsa, &osa) != -1 &&
+ osa.sa_handler != sig_handler)
+ el->el_signal->sig_action[i] = osa;
}
sel = el;
(void) sigprocmask(SIG_SETMASK, &oset, NULL);
@@ -173,20 +182,17 @@ sig_set(EditLine *el)
protected void
sig_clr(EditLine *el)
{
- int i;
- sigset_t nset, oset;
+ size_t i;
+ sigset_t oset;
- (void) sigemptyset(&nset);
-#define _DO(a) (void) sigaddset(&nset, a);
- ALLSIGS
-#undef _DO
- (void) sigprocmask(SIG_BLOCK, &nset, &oset);
+ (void) sigprocmask(SIG_BLOCK, &el->el_signal->sig_set, &oset);
for (i = 0; sighdl[i] != -1; i++)
- if (el->el_signal[i] != SIG_ERR)
- (void) signal(sighdl[i], el->el_signal[i]);
+ if (el->el_signal->sig_action[i].sa_handler != SIG_ERR)
+ (void)sigaction(sighdl[i],
+ &el->el_signal->sig_action[i], NULL);
sel = NULL; /* we are going to die if the handler is
* called */
- (void) sigprocmask(SIG_SETMASK, &oset, NULL);
+ (void)sigprocmask(SIG_SETMASK, &oset, NULL);
}
diff --git a/lib/libedit/sig.h b/lib/libedit/sig.h
index b1ce14b..7e38100 100644
--- a/lib/libedit/sig.h
+++ b/lib/libedit/sig.h
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*
* @(#)sig.h 8.1 (Berkeley) 6/4/93
- * $NetBSD: sig.h,v 1.5 2003/08/07 16:44:33 agc Exp $
+ * $NetBSD: sig.h,v 1.8 2009/02/19 15:20:22 christos Exp $
* $FreeBSD$
*/
@@ -51,15 +51,18 @@
#define ALLSIGS \
_DO(SIGINT) \
_DO(SIGTSTP) \
- _DO(SIGSTOP) \
_DO(SIGQUIT) \
_DO(SIGHUP) \
_DO(SIGTERM) \
_DO(SIGCONT) \
_DO(SIGWINCH)
+#define ALLSIGSNO 7
-typedef void (*el_signalhandler_t)(int);
-typedef el_signalhandler_t *el_signal_t;
+typedef struct {
+ struct sigaction sig_action[ALLSIGSNO];
+ sigset_t sig_set;
+ volatile sig_atomic_t sig_no;
+} *el_signal_t;
protected void sig_end(EditLine*);
protected int sig_init(EditLine*);
diff --git a/lib/libedit/term.c b/lib/libedit/term.c
index 1d89279..e526484 100644
--- a/lib/libedit/term.c
+++ b/lib/libedit/term.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $NetBSD: term.c,v 1.46 2006/11/24 00:01:17 christos Exp $
+ * $NetBSD: term.c,v 1.56 2009/12/28 21:54:21 christos Exp $
*/
#if !defined(lint) && !defined(SCCSID)
@@ -261,9 +261,13 @@ private int term_alloc_display(EditLine *);
private void term_alloc(EditLine *, const struct termcapstr *, const char *);
private void term_init_arrow(EditLine *);
private void term_reset_arrow(EditLine *);
+private int term_putc(int);
+private void term_tputs(EditLine *, const char *, int);
-
-private FILE *term_outfile = NULL; /* XXX: How do we fix that? */
+#ifdef _REENTRANT
+private pthread_mutex_t term_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif
+private FILE *term_outfile = NULL;
/* term_setflags():
@@ -311,7 +315,6 @@ term_setflags(EditLine *el)
#endif /* DEBUG_SCREEN */
}
-
/* term_init():
* Initialize the terminal stuff
*/
@@ -337,9 +340,8 @@ term_init(EditLine *el)
if (el->el_term.t_val == NULL)
return (-1);
(void) memset(el->el_term.t_val, 0, T_val * sizeof(int));
- term_outfile = el->el_outfile;
- term_init_arrow(el);
(void) term_set(el, NULL);
+ term_init_arrow(el);
return (0);
}
@@ -372,7 +374,7 @@ private void
term_alloc(EditLine *el, const struct termcapstr *t, const char *cap)
{
char termbuf[TC_BUFSIZE];
- int tlen, clen;
+ size_t tlen, clen;
char **tlist = el->el_term.t_str;
char **tmp, **str = &tlist[t - tstr];
@@ -399,7 +401,7 @@ term_alloc(EditLine *el, const struct termcapstr *t, const char *cap)
/* XXX strcpy is safe */
(void) strcpy(*str = &el->el_term.t_buf[el->el_term.t_loc],
cap);
- el->el_term.t_loc += clen + 1; /* one for \0 */
+ el->el_term.t_loc += (int)clen + 1; /* one for \0 */
return;
}
/*
@@ -416,7 +418,7 @@ term_alloc(EditLine *el, const struct termcapstr *t, const char *cap)
termbuf[tlen++] = '\0';
}
memcpy(el->el_term.t_buf, termbuf, TC_BUFSIZE);
- el->el_term.t_loc = tlen;
+ el->el_term.t_loc = (int)tlen;
if (el->el_term.t_loc + 3 >= TC_BUFSIZE) {
(void) fprintf(el->el_errfile,
"Out of termcap string space.\n");
@@ -424,7 +426,7 @@ term_alloc(EditLine *el, const struct termcapstr *t, const char *cap)
}
/* XXX strcpy is safe */
(void) strcpy(*str = &el->el_term.t_buf[el->el_term.t_loc], cap);
- el->el_term.t_loc += clen + 1; /* one for \0 */
+ el->el_term.t_loc += (int)clen + 1; /* one for \0 */
return;
}
@@ -542,19 +544,20 @@ term_move_to_line(EditLine *el, int where)
el->el_display[el->el_cursor.v][0] != '\0') {
/* move without newline */
term_move_to_char(el, el->el_term.t_size.h - 1);
- term_overwrite(el,
- &el->el_display[el->el_cursor.v][el->el_cursor.h],
- 1);
+ term_overwrite(el, &el->el_display
+ [el->el_cursor.v][el->el_cursor.h],
+ (size_t)(el->el_term.t_size.h -
+ el->el_cursor.h));
/* updates Cursor */
del--;
} else {
if ((del > 1) && GoodStr(T_DO)) {
- (void) tputs(tgoto(Str(T_DO), del, del),
- del, term__putc);
+ term_tputs(el, tgoto(Str(T_DO), del,
+ del), del);
del = 0;
} else {
for (; del > 0; del--)
- term__putc('\n');
+ term__putc(el, '\n');
/* because the \n will become \r\n */
el->el_cursor.h = 0;
}
@@ -562,12 +565,11 @@ term_move_to_line(EditLine *el, int where)
}
} else { /* del < 0 */
if (GoodStr(T_UP) && (-del > 1 || !GoodStr(T_up)))
- (void) tputs(tgoto(Str(T_UP), -del, -del), -del,
- term__putc);
+ term_tputs(el, tgoto(Str(T_UP), -del, -del), -del);
else {
if (GoodStr(T_up))
for (; del < 0; del++)
- (void) tputs(Str(T_up), 1, term__putc);
+ term_tputs(el, Str(T_up), 1);
}
}
el->el_cursor.v = where;/* now where is here */
@@ -594,7 +596,7 @@ mc_again:
return;
}
if (!where) { /* if where is first column */
- term__putc('\r'); /* do a CR */
+ term__putc(el, '\r'); /* do a CR */
el->el_cursor.h = 0;
return;
}
@@ -602,25 +604,24 @@ mc_again:
if ((del < -4 || del > 4) && GoodStr(T_ch))
/* go there directly */
- (void) tputs(tgoto(Str(T_ch), where, where), where, term__putc);
+ term_tputs(el, tgoto(Str(T_ch), where, where), where);
else {
if (del > 0) { /* moving forward */
if ((del > 4) && GoodStr(T_RI))
- (void) tputs(tgoto(Str(T_RI), del, del),
- del, term__putc);
+ term_tputs(el, tgoto(Str(T_RI), del, del), del);
else {
/* if I can do tabs, use them */
if (EL_CAN_TAB) {
if ((el->el_cursor.h & 0370) !=
- (where & 0370)) {
+ (where & ~0x7)) {
/* if not within tab stop */
for (i =
(el->el_cursor.h & 0370);
- i < (where & 0370);
+ i < (where & ~0x7);
i += 8)
- term__putc('\t');
+ term__putc(el, '\t');
/* then tab over */
- el->el_cursor.h = where & 0370;
+ el->el_cursor.h = where & ~0x7;
}
}
/*
@@ -631,15 +632,15 @@ mc_again:
* NOTE THAT term_overwrite() WILL CHANGE
* el->el_cursor.h!!!
*/
- term_overwrite(el,
- &el->el_display[el->el_cursor.v][el->el_cursor.h],
- where - el->el_cursor.h);
+ term_overwrite(el, &el->el_display[
+ el->el_cursor.v][el->el_cursor.h],
+ (size_t)(where - el->el_cursor.h));
}
} else { /* del < 0 := moving backward */
if ((-del > 4) && GoodStr(T_LE))
- (void) tputs(tgoto(Str(T_LE), -del, -del),
- -del, term__putc);
+ term_tputs(el, tgoto(Str(T_LE), -del, -del),
+ -del);
else { /* can't go directly there */
/*
* if the "cost" is greater than the "cost"
@@ -650,12 +651,12 @@ mc_again:
(((unsigned int) where >> 3) +
(where & 07)))
: (-del > where)) {
- term__putc('\r'); /* do a CR */
+ term__putc(el, '\r'); /* do a CR */
el->el_cursor.h = 0;
goto mc_again; /* and try again */
}
for (i = 0; i < -del; i++)
- term__putc('\b');
+ term__putc(el, '\b');
}
}
}
@@ -667,20 +668,21 @@ mc_again:
* Overstrike num characters
*/
protected void
-term_overwrite(EditLine *el, const char *cp, int n)
+term_overwrite(EditLine *el, const char *cp, size_t n)
{
- if (n <= 0)
- return; /* catch bugs */
+ if (n == 0)
+ return;
- if (n > el->el_term.t_size.h) {
+ if (n > (size_t)el->el_term.t_size.h) {
#ifdef DEBUG_SCREEN
(void) fprintf(el->el_errfile,
"term_overwrite: n is riduculous: %d\r\n", n);
#endif /* DEBUG_SCREEN */
return;
}
+
do {
- term__putc(*cp++);
+ term__putc(el, *cp++);
el->el_cursor.h++;
} while (--n);
@@ -695,12 +697,13 @@ term_overwrite(EditLine *el, const char *cp, int n)
if ((c = el->el_display[el->el_cursor.v][el->el_cursor.h])
!= '\0')
term_overwrite(el, &c, 1);
- else
- term__putc(' ');
- el->el_cursor.h = 1;
+ else {
+ term__putc(el, ' ');
+ el->el_cursor.h = 1;
+ }
}
} else /* no wrap, but cursor stays on screen */
- el->el_cursor.h = el->el_term.t_size.h;
+ el->el_cursor.h = el->el_term.t_size.h - 1;
}
}
@@ -730,19 +733,18 @@ term_deletechars(EditLine *el, int num)
if (GoodStr(T_DC)) /* if I have multiple delete */
if ((num > 1) || !GoodStr(T_dc)) { /* if dc would be more
* expen. */
- (void) tputs(tgoto(Str(T_DC), num, num),
- num, term__putc);
+ term_tputs(el, tgoto(Str(T_DC), num, num), num);
return;
}
if (GoodStr(T_dm)) /* if I have delete mode */
- (void) tputs(Str(T_dm), 1, term__putc);
+ term_tputs(el, Str(T_dm), 1);
if (GoodStr(T_dc)) /* else do one at a time */
while (num--)
- (void) tputs(Str(T_dc), 1, term__putc);
+ term_tputs(el, Str(T_dc), 1);
if (GoodStr(T_ed)) /* if I have delete mode */
- (void) tputs(Str(T_ed), 1, term__putc);
+ term_tputs(el, Str(T_ed), 1);
}
@@ -771,37 +773,35 @@ term_insertwrite(EditLine *el, char *cp, int num)
if (GoodStr(T_IC)) /* if I have multiple insert */
if ((num > 1) || !GoodStr(T_ic)) {
/* if ic would be more expensive */
- (void) tputs(tgoto(Str(T_IC), num, num),
- num, term__putc);
- term_overwrite(el, cp, num);
+ term_tputs(el, tgoto(Str(T_IC), num, num), num);
+ term_overwrite(el, cp, (size_t)num);
/* this updates el_cursor.h */
return;
}
if (GoodStr(T_im) && GoodStr(T_ei)) { /* if I have insert mode */
- (void) tputs(Str(T_im), 1, term__putc);
+ term_tputs(el, Str(T_im), 1);
el->el_cursor.h += num;
do
- term__putc(*cp++);
+ term__putc(el, *cp++);
while (--num);
if (GoodStr(T_ip)) /* have to make num chars insert */
- (void) tputs(Str(T_ip), 1, term__putc);
+ term_tputs(el, Str(T_ip), 1);
- (void) tputs(Str(T_ei), 1, term__putc);
+ term_tputs(el, Str(T_ei), 1);
return;
}
do {
if (GoodStr(T_ic)) /* have to make num chars insert */
- (void) tputs(Str(T_ic), 1, term__putc);
- /* insert a char */
+ term_tputs(el, Str(T_ic), 1);
- term__putc(*cp++);
+ term__putc(el, *cp++);
el->el_cursor.h++;
if (GoodStr(T_ip)) /* have to make num chars insert */
- (void) tputs(Str(T_ip), 1, term__putc);
+ term_tputs(el, Str(T_ip), 1);
/* pad the inserted char */
} while (--num);
@@ -817,10 +817,10 @@ term_clear_EOL(EditLine *el, int num)
int i;
if (EL_CAN_CEOL && GoodStr(T_ce))
- (void) tputs(Str(T_ce), 1, term__putc);
+ term_tputs(el, Str(T_ce), 1);
else {
for (i = 0; i < num; i++)
- term__putc(' ');
+ term__putc(el, ' ');
el->el_cursor.h += num; /* have written num spaces */
}
}
@@ -835,14 +835,14 @@ term_clear_screen(EditLine *el)
if (GoodStr(T_cl))
/* send the clear screen code */
- (void) tputs(Str(T_cl), Val(T_li), term__putc);
+ term_tputs(el, Str(T_cl), Val(T_li));
else if (GoodStr(T_ho) && GoodStr(T_cd)) {
- (void) tputs(Str(T_ho), Val(T_li), term__putc); /* home */
+ term_tputs(el, Str(T_ho), Val(T_li)); /* home */
/* clear to bottom of screen */
- (void) tputs(Str(T_cd), Val(T_li), term__putc);
+ term_tputs(el, Str(T_cd), Val(T_li));
} else {
- term__putc('\r');
- term__putc('\n');
+ term__putc(el, '\r');
+ term__putc(el, '\n');
}
}
@@ -855,9 +855,9 @@ term_beep(EditLine *el)
{
if (GoodStr(T_bl))
/* what termcap says we should use */
- (void) tputs(Str(T_bl), 1, term__putc);
+ term_tputs(el, Str(T_bl), 1);
else
- term__putc('\007'); /* an ASCII bell; ^G */
+ term__putc(el, '\007'); /* an ASCII bell; ^G */
}
@@ -869,9 +869,9 @@ protected void
term_clear_to_bottom(EditLine *el)
{
if (GoodStr(T_cd))
- (void) tputs(Str(T_cd), Val(T_li), term__putc);
+ term_tputs(el, Str(T_cd), Val(T_li));
else if (GoodStr(T_ce))
- (void) tputs(Str(T_ce), Val(T_li), term__putc);
+ term_tputs(el, Str(T_ce), Val(T_li));
}
#endif
@@ -1238,26 +1238,49 @@ term_bind_arrow(EditLine *el)
}
}
+/* term_putc():
+ * Add a character
+ */
+private int
+term_putc(int c)
+{
+
+ if (term_outfile == NULL)
+ return -1;
+ return fputc(c, term_outfile);
+}
+
+private void
+term_tputs(EditLine *el, const char *cap, int affcnt)
+{
+#ifdef _REENTRANT
+ pthread_mutex_lock(&term_mutex);
+#endif
+ term_outfile = el->el_outfile;
+ (void)tputs(cap, affcnt, term_putc);
+#ifdef _REENTRANT
+ pthread_mutex_unlock(&term_mutex);
+#endif
+}
/* term__putc():
* Add a character
*/
protected int
-term__putc(int c)
+term__putc(EditLine *el, int c)
{
- return (fputc(c, term_outfile));
+ return fputc(c, el->el_outfile);
}
-
/* term__flush():
* Flush output
*/
protected void
-term__flush(void)
+term__flush(EditLine *el)
{
- (void) fflush(term_outfile);
+ (void) fflush(el->el_outfile);
}
/* term_writec():
@@ -1267,10 +1290,10 @@ protected void
term_writec(EditLine *el, int c)
{
char buf[8];
- int cnt = key__decode_char(buf, sizeof(buf), 0, c);
+ size_t cnt = key__decode_char(buf, sizeof(buf), 0, c);
buf[cnt] = '\0';
- term_overwrite(el, buf, cnt);
- term__flush();
+ term_overwrite(el, buf, (size_t)cnt);
+ term__flush(el);
}
@@ -1585,7 +1608,7 @@ term_echotc(EditLine *el, int argc __unused,
*argv);
return (-1);
}
- (void) tputs(scap, 1, term__putc);
+ term_tputs(el, scap, 1);
break;
case 1:
argv++;
@@ -1613,7 +1636,7 @@ term_echotc(EditLine *el, int argc __unused,
*argv);
return (-1);
}
- (void) tputs(tgoto(scap, arg_cols, arg_rows), 1, term__putc);
+ term_tputs(el, tgoto(scap, arg_cols, arg_rows), 1);
break;
default:
/* This is wrong, but I will ignore it... */
@@ -1669,8 +1692,7 @@ term_echotc(EditLine *el, int argc __unused,
*argv);
return (-1);
}
- (void) tputs(tgoto(scap, arg_cols, arg_rows), arg_rows,
- term__putc);
+ term_tputs(el, tgoto(scap, arg_cols, arg_rows), arg_rows);
break;
}
return (0);
diff --git a/lib/libedit/term.h b/lib/libedit/term.h
index 15d393c..4bf4685 100644
--- a/lib/libedit/term.h
+++ b/lib/libedit/term.h
@@ -85,7 +85,7 @@ typedef struct {
protected void term_move_to_line(EditLine *, int);
protected void term_move_to_char(EditLine *, int);
protected void term_clear_EOL(EditLine *, int);
-protected void term_overwrite(EditLine *, const char *, int);
+protected void term_overwrite(EditLine *, const char *, size_t);
protected void term_insertwrite(EditLine *, char *, int);
protected void term_deletechars(EditLine *, int);
protected void term_clear_screen(EditLine *);
@@ -105,8 +105,8 @@ protected int term_gettc(EditLine *, int, char **);
protected int term_telltc(EditLine *, int, const char **);
protected int term_echotc(EditLine *, int, const char **);
protected void term_writec(EditLine *, int);
-protected int term__putc(int);
-protected void term__flush(void);
+protected int term__putc(EditLine *, int);
+protected void term__flush(EditLine *);
/*
* Easy access macros
diff --git a/lib/libedit/tokenizer.c b/lib/libedit/tokenizer.c
index 8e3100d..41284e8 100644
--- a/lib/libedit/tokenizer.c
+++ b/lib/libedit/tokenizer.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $NetBSD: tokenizer.c,v 1.14 2003/12/05 13:37:48 lukem Exp $
+ * $NetBSD: tokenizer.c,v 1.15 2009/02/15 21:55:23 christos Exp $
*/
#if !defined(lint) && !defined(SCCSID)
@@ -198,7 +198,7 @@ tok_line(Tokenizer *tok, const LineInfo *line,
ptr = "";
if (ptr == line->cursor) {
cc = tok->argc;
- co = tok->wptr - tok->wstart;
+ co = (int)(tok->wptr - tok->wstart);
}
switch (*ptr) {
case '\'':
@@ -417,7 +417,7 @@ tok_line(Tokenizer *tok, const LineInfo *line,
tok_line_outok:
if (cc == -1 && co == -1) {
cc = tok->argc;
- co = tok->wptr - tok->wstart;
+ co = (int)(tok->wptr - tok->wstart);
}
if (cursorc != NULL)
*cursorc = cc;
diff --git a/lib/libedit/tty.c b/lib/libedit/tty.c
index fca3c2b..c0b4638 100644
--- a/lib/libedit/tty.c
+++ b/lib/libedit/tty.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $NetBSD: tty.c,v 1.24 2006/03/18 09:07:05 christos Exp $
+ * $NetBSD: tty.c,v 1.25 2006/03/18 09:09:41 christos Exp $
*/
#if !defined(lint) && !defined(SCCSID)
diff --git a/lib/libedit/vi.c b/lib/libedit/vi.c
index ae57e07..4826901 100644
--- a/lib/libedit/vi.c
+++ b/lib/libedit/vi.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $NetBSD: vi.c,v 1.25 2006/03/06 21:11:56 christos Exp $
+ * $NetBSD: vi.c,v 1.30 2009/02/21 23:31:56 christos Exp $
*/
#if !defined(lint) && !defined(SCCSID)
@@ -63,7 +63,7 @@ cv_action(EditLine *el, int c)
if (!(c & YANK))
cv_undo(el);
cv_yank(el, el->el_line.buffer,
- el->el_line.lastchar - el->el_line.buffer);
+ (int)(el->el_line.lastchar - el->el_line.buffer));
el->el_chared.c_vcmd.action = NOP;
el->el_chared.c_vcmd.pos = 0;
if (!(c & YANK)) {
@@ -87,12 +87,12 @@ private el_action_t
cv_paste(EditLine *el, int c)
{
c_kill_t *k = &el->el_chared.c_kill;
- int len = k->last - k->buf;
+ size_t len = (size_t)(k->last - k->buf);
if (k->buf == NULL || len == 0)
return (CC_ERROR);
#ifdef DEBUG_PASTE
- (void) fprintf(el->el_errfile, "Paste: \"%.*s\"\n", len, k->buf);
+ (void) fprintf(el->el_errfile, "Paste: \"%.*s\"\n", (int)len, k->buf);
#endif
cv_undo(el);
@@ -100,10 +100,10 @@ cv_paste(EditLine *el, int c)
if (!c && el->el_line.cursor < el->el_line.lastchar)
el->el_line.cursor++;
- c_insert(el, len);
+ c_insert(el, (int)len);
if (el->el_line.cursor + len > el->el_line.lastchar)
return (CC_ERROR);
- (void) memcpy(el->el_line.cursor, k->buf, len +0u);
+ (void) memcpy(el->el_line.cursor, k->buf, len);
return (CC_REFRESH);
}
@@ -358,7 +358,7 @@ vi_substitute_line(EditLine *el, int c __unused)
cv_undo(el);
cv_yank(el, el->el_line.buffer,
- el->el_line.lastchar - el->el_line.buffer);
+ (int)(el->el_line.lastchar - el->el_line.buffer));
(void) em_kill_line(el, 0);
el->el_map.current = el->el_map.key;
return (CC_REFRESH);
@@ -376,7 +376,7 @@ vi_change_to_eol(EditLine *el, int c __unused)
cv_undo(el);
cv_yank(el, el->el_line.cursor,
- el->el_line.lastchar - el->el_line.cursor);
+ (int)(el->el_line.lastchar - el->el_line.cursor));
(void) ed_kill_line(el, 0);
el->el_map.current = el->el_map.key;
return (CC_REFRESH);
@@ -516,7 +516,8 @@ vi_undo(EditLine *el, int c __unused)
/* switch line buffer and undo buffer */
el->el_chared.c_undo.buf = el->el_line.buffer;
el->el_chared.c_undo.len = el->el_line.lastchar - el->el_line.buffer;
- el->el_chared.c_undo.cursor = el->el_line.cursor - el->el_line.buffer;
+ el->el_chared.c_undo.cursor =
+ (int)(el->el_line.cursor - el->el_line.buffer);
el->el_line.limit = un.buf + (el->el_line.limit - el->el_line.buffer);
el->el_line.buffer = un.buf;
el->el_line.cursor = un.buf + un.cursor;
@@ -641,7 +642,7 @@ vi_kill_line_prev(EditLine *el, int c __unused)
while (cp < el->el_line.cursor)
*kp++ = *cp++; /* copy it */
el->el_chared.c_kill.last = kp;
- c_delbefore(el, el->el_line.cursor - el->el_line.buffer);
+ c_delbefore(el, (int)(el->el_line.cursor - el->el_line.buffer));
el->el_line.cursor = el->el_line.buffer; /* zap! */
return (CC_REFRESH);
}
@@ -797,7 +798,7 @@ vi_match(EditLine *el, int c)
{
const char match_chars[] = "()[]{}";
char *cp;
- int delta, i, count;
+ size_t delta, i, count;
char o_ch, c_ch;
*el->el_line.lastchar = '\0'; /* just in case */
@@ -872,7 +873,7 @@ vi_yank_end(EditLine *el, int c)
{
cv_yank(el, el->el_line.cursor,
- el->el_line.lastchar - el->el_line.cursor);
+ (int)(el->el_line.lastchar - el->el_line.cursor));
return CC_REFRESH;
}
@@ -993,7 +994,8 @@ vi_histedit(EditLine *el, int c)
{
int fd;
pid_t pid;
- int st;
+ ssize_t st;
+ int status;
char tempfile[] = "/tmp/histedit.XXXXXXXXXX";
char *cp;
@@ -1006,7 +1008,7 @@ vi_histedit(EditLine *el, int c)
if (fd < 0)
return CC_ERROR;
cp = el->el_line.buffer;
- write(fd, cp, el->el_line.lastchar - cp +0u);
+ write(fd, cp, (size_t)(el->el_line.lastchar - cp));
write(fd, "\n", 1);
pid = fork();
switch (pid) {
@@ -1016,14 +1018,14 @@ vi_histedit(EditLine *el, int c)
return CC_ERROR;
case 0:
close(fd);
- execlp("vi", "vi", tempfile, NULL);
+ execlp("vi", "vi", tempfile, (char *)NULL);
exit(0);
/*NOTREACHED*/
default:
- while (waitpid(pid, &st, 0) != pid)
+ while (waitpid(pid, &status, 0) != pid)
continue;
- lseek(fd, 0ll, SEEK_SET);
- st = read(fd, cp, el->el_line.limit - cp +0u);
+ lseek(fd, (off_t)0, SEEK_SET);
+ st = read(fd, cp, (size_t)(el->el_line.limit - cp));
if (st > 0 && cp[st - 1] == '\n')
st--;
el->el_line.cursor = cp;
@@ -1072,7 +1074,7 @@ vi_history_word(EditLine *el, int c)
return CC_ERROR;
cv_undo(el);
- len = wep - wsp;
+ len = (int)(wep - wsp);
if (el->el_line.cursor < el->el_line.lastchar)
el->el_line.cursor++;
c_insert(el, len + 1);
diff --git a/lib/libelf/Makefile b/lib/libelf/Makefile
index fe921cb..f4baf14 100644
--- a/lib/libelf/Makefile
+++ b/lib/libelf/Makefile
@@ -55,9 +55,22 @@ SRCS= elf_begin.c \
${GENSRCS}
INCS= libelf.h gelf.h
+#
+# We need to link against the correct version of these files. One
+# solution is to include ../../sys in the include path. This causes
+# problems when a header file in sys depends on a file in another
+# part of the tree, e.g. a machine dependent header.
+#
+SRCS+= sys/elf32.h sys/elf64.h sys/elf_common.h
+
GENSRCS= libelf_fsize.c libelf_msize.c libelf_convert.c
CLEANFILES= ${GENSRCS}
-CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../sys
+CLEANDIRS= sys
+CFLAGS+= -I${.CURDIR} -I.
+
+sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET}
+ mkdir -p ${.OBJDIR}/sys
+ ln -sf ${.CURDIR}/../../sys/${.TARGET} ${.TARGET}
SHLIB_MAJOR= 1
diff --git a/lib/libelf/Makefile.depend b/lib/libelf/Makefile.depend
new file mode 100644
index 0000000..a2d3144
--- /dev/null
+++ b/lib/libelf/Makefile.depend
@@ -0,0 +1,25 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+libelf_convert.So: libelf_convert.c
+libelf_convert.o: libelf_convert.c
+libelf_convert.po: libelf_convert.c
+libelf_fsize.So: libelf_fsize.c
+libelf_fsize.o: libelf_fsize.c
+libelf_fsize.po: libelf_fsize.c
+libelf_msize.So: libelf_msize.c
+libelf_msize.o: libelf_msize.c
+libelf_msize.po: libelf_msize.c
+.endif
diff --git a/lib/libelf/elf_errmsg.c b/lib/libelf/elf_errmsg.c
index 05947a7..193a602 100644
--- a/lib/libelf/elf_errmsg.c
+++ b/lib/libelf/elf_errmsg.c
@@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$");
* Retrieve a human readable translation for an error message.
*/
-const char *_libelf_errors[] = {
+static const char *_libelf_errors[] = {
#define DEFINE_ERROR(N,S) [ELF_E_##N] = S
DEFINE_ERROR(NONE, "No Error"),
DEFINE_ERROR(ARCHIVE, "Malformed ar(1) archive"),
diff --git a/lib/libexpat/Makefile.depend b/lib/libexpat/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libexpat/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libfetch/Makefile b/lib/libfetch/Makefile
index 7b29aa2..085aba2 100644
--- a/lib/libfetch/Makefile
+++ b/lib/libfetch/Makefile
@@ -16,8 +16,8 @@ CFLAGS+= -DINET6
.if ${MK_OPENSSL} != "no"
CFLAGS+= -DWITH_SSL
-DPADD= ${LIBSSL} ${LIBCRYPTO} ${LIBMD}
-LDADD= -lssl -lcrypto -lmd
+DPADD= ${LIBSSL} ${LIBCRYPTO}
+LDADD= -lssl -lcrypto
.else
DPADD= ${LIBMD}
LDADD= -lmd
diff --git a/lib/libfetch/Makefile.depend b/lib/libfetch/Makefile.depend
new file mode 100644
index 0000000..145c133
--- /dev/null
+++ b/lib/libfetch/Makefile.depend
@@ -0,0 +1,22 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+ftp.So: ftperr.h
+ftp.o: ftperr.h
+ftp.po: ftperr.h
+http.So: httperr.h
+http.o: httperr.h
+http.po: httperr.h
+.endif
diff --git a/lib/libfetch/common.h b/lib/libfetch/common.h
index 241dbbf..fe591d3 100644
--- a/lib/libfetch/common.h
+++ b/lib/libfetch/common.h
@@ -63,7 +63,7 @@ struct fetchconn {
SSL *ssl; /* SSL handle */
SSL_CTX *ssl_ctx; /* SSL context */
X509 *ssl_cert; /* server certificate */
- SSL_METHOD *ssl_meth; /* SSL method */
+ const SSL_METHOD *ssl_meth; /* SSL method */
#endif
int ref; /* reference count */
};
diff --git a/lib/libfetch/file.c b/lib/libfetch/file.c
index 8569ff3..8c1d404 100644
--- a/lib/libfetch/file.c
+++ b/lib/libfetch/file.c
@@ -50,12 +50,15 @@ fetchXGetFile(struct url *u, struct url_stat *us, const char *flags)
f = fopen(u->doc, "r");
- if (f == NULL)
+ if (f == NULL) {
fetch_syserr();
+ return (NULL);
+ }
if (u->offset && fseeko(f, u->offset, SEEK_SET) == -1) {
fclose(f);
fetch_syserr();
+ return (NULL);
}
fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
@@ -78,12 +81,15 @@ fetchPutFile(struct url *u, const char *flags)
else
f = fopen(u->doc, "w+");
- if (f == NULL)
+ if (f == NULL) {
fetch_syserr();
+ return (NULL);
+ }
if (u->offset && fseeko(f, u->offset, SEEK_SET) == -1) {
fclose(f);
fetch_syserr();
+ return (NULL);
}
fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c
index f6e063a..00dd887 100644
--- a/lib/libfetch/http.c
+++ b/lib/libfetch/http.c
@@ -76,7 +76,15 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <time.h>
#include <unistd.h>
+
+#ifdef WITH_SSL
+#include <openssl/md5.h>
+#define MD5Init(c) MD5_Init(c)
+#define MD5Update(c, data, len) MD5_Update(c, data, len)
+#define MD5Final(md, c) MD5_Final(md, c)
+#else
#include <md5.h>
+#endif
#include <netinet/in.h>
#include <netinet/tcp.h>
@@ -86,7 +94,7 @@ __FBSDID("$FreeBSD$");
#include "httperr.h"
/* Maximum number of redirects to follow */
-#define MAX_REDIRECT 5
+#define MAX_REDIRECT 20
/* Symbolic names for reply codes we care about */
#define HTTP_OK 200
@@ -95,7 +103,9 @@ __FBSDID("$FreeBSD$");
#define HTTP_MOVED_TEMP 302
#define HTTP_SEE_OTHER 303
#define HTTP_NOT_MODIFIED 304
+#define HTTP_USE_PROXY 305
#define HTTP_TEMP_REDIRECT 307
+#define HTTP_PERM_REDIRECT 308
#define HTTP_NEED_AUTH 401
#define HTTP_NEED_PROXY_AUTH 407
#define HTTP_BAD_RANGE 416
@@ -104,6 +114,7 @@ __FBSDID("$FreeBSD$");
#define HTTP_REDIRECT(xyz) ((xyz) == HTTP_MOVED_PERM \
|| (xyz) == HTTP_MOVED_TEMP \
|| (xyz) == HTTP_TEMP_REDIRECT \
+ || (xyz) == HTTP_USE_PROXY \
|| (xyz) == HTTP_SEE_OTHER)
#define HTTP_ERROR(xyz) ((xyz) > 400 && (xyz) < 599)
@@ -1516,8 +1527,7 @@ http_request(struct url *URL, const char *op, struct url_stat *us,
/* try the provided URL first */
url = URL;
- /* if the A flag is set, we only get one try */
- n = noredirect ? 1 : MAX_REDIRECT;
+ n = MAX_REDIRECT;
i = 0;
e = HTTP_PROTOCOL_ERROR;
@@ -1689,6 +1699,7 @@ http_request(struct url *URL, const char *op, struct url_stat *us,
case HTTP_MOVED_PERM:
case HTTP_MOVED_TEMP:
case HTTP_SEE_OTHER:
+ case HTTP_USE_PROXY:
/*
* Not so fine, but we still have to read the
* headers to get the new location.
@@ -1764,6 +1775,17 @@ http_request(struct url *URL, const char *op, struct url_stat *us,
case hdr_location:
if (!HTTP_REDIRECT(conn->err))
break;
+ /*
+ * if the A flag is set, we don't follow
+ * temporary redirects.
+ */
+ if (noredirect &&
+ conn->err != HTTP_MOVED_PERM &&
+ conn->err != HTTP_PERM_REDIRECT &&
+ conn->err != HTTP_USE_PROXY) {
+ n = 1;
+ break;
+ }
if (new)
free(new);
if (verbose)
diff --git a/lib/libfetch/http.errors b/lib/libfetch/http.errors
index 1f38574..e5389fe 100644
--- a/lib/libfetch/http.errors
+++ b/lib/libfetch/http.errors
@@ -18,6 +18,7 @@
304 OK Not Modified
305 INFO Use Proxy
307 MOVED Temporary Redirect
+308 MOVED Permanent Redirect
400 PROTO Bad Request
401 AUTH Unauthorized
402 AUTH Payment Required
diff --git a/lib/libgeom/Makefile.depend b/lib/libgeom/Makefile.depend
new file mode 100644
index 0000000..5c54095
--- /dev/null
+++ b/lib/libgeom/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libexpat \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libgeom/geom_xml2tree.c b/lib/libgeom/geom_xml2tree.c
index 24315cd..02be019 100644
--- a/lib/libgeom/geom_xml2tree.c
+++ b/lib/libgeom/geom_xml2tree.c
@@ -56,6 +56,8 @@ struct mystate {
struct sbuf *sbuf[20];
struct gconf *config;
int nident;
+ XML_Parser parser;
+ int error;
};
static void
@@ -85,6 +87,8 @@ StartElement(void *userData, const char *name, const char **attr)
if (!strcmp(name, "class") && mt->class == NULL) {
mt->class = calloc(1, sizeof *mt->class);
if (mt->class == NULL) {
+ mt->error = errno;
+ XML_StopParser(mt->parser, 0);
warn("Cannot allocate memory during processing of '%s' "
"element", name);
return;
@@ -98,6 +102,8 @@ StartElement(void *userData, const char *name, const char **attr)
if (!strcmp(name, "geom") && mt->geom == NULL) {
mt->geom = calloc(1, sizeof *mt->geom);
if (mt->geom == NULL) {
+ mt->error = errno;
+ XML_StopParser(mt->parser, 0);
warn("Cannot allocate memory during processing of '%s' "
"element", name);
return;
@@ -116,6 +122,8 @@ StartElement(void *userData, const char *name, const char **attr)
if (!strcmp(name, "consumer") && mt->consumer == NULL) {
mt->consumer = calloc(1, sizeof *mt->consumer);
if (mt->consumer == NULL) {
+ mt->error = errno;
+ XML_StopParser(mt->parser, 0);
warn("Cannot allocate memory during processing of '%s' "
"element", name);
return;
@@ -137,6 +145,8 @@ StartElement(void *userData, const char *name, const char **attr)
if (!strcmp(name, "provider") && mt->provider == NULL) {
mt->provider = calloc(1, sizeof *mt->provider);
if (mt->provider == NULL) {
+ mt->error = errno;
+ XML_StopParser(mt->parser, 0);
warn("Cannot allocate memory during processing of '%s' "
"element", name);
return;
@@ -180,16 +190,19 @@ EndElement(void *userData, const char *name)
char *p;
mt = userData;
- sbuf_finish(mt->sbuf[mt->level]);
- p = strdup(sbuf_data(mt->sbuf[mt->level]));
+ p = NULL;
+ if (sbuf_finish(mt->sbuf[mt->level]) == 0)
+ p = strdup(sbuf_data(mt->sbuf[mt->level]));
+ sbuf_delete(mt->sbuf[mt->level]);
+ mt->sbuf[mt->level] = NULL;
+ mt->level--;
if (p == NULL) {
+ mt->error = errno;
+ XML_StopParser(mt->parser, 0);
warn("Cannot allocate memory during processing of '%s' "
"element", name);
return;
}
- sbuf_delete(mt->sbuf[mt->level]);
- mt->sbuf[mt->level] = NULL;
- mt->level--;
if (strlen(p) == 0) {
free(p);
p = NULL;
@@ -249,12 +262,16 @@ EndElement(void *userData, const char *name)
if (mt->config != NULL) {
gc = calloc(1, sizeof *gc);
if (gc == NULL) {
+ mt->error = errno;
+ XML_StopParser(mt->parser, 0);
warn("Cannot allocate memory during processing of '%s' "
"element", name);
return;
}
gc->lg_name = strdup(name);
if (gc->lg_name == NULL) {
+ mt->error = errno;
+ XML_StopParser(mt->parser, 0);
warn("Cannot allocate memory during processing of '%s' "
"element", name);
return;
@@ -334,7 +351,7 @@ geom_xml2tree(struct gmesh *gmp, char *p)
struct ggeom *ge;
struct gprovider *pr;
struct gconsumer *co;
- int i;
+ int error, i;
memset(gmp, 0, sizeof *gmp);
LIST_INIT(&gmp->lg_class);
@@ -347,14 +364,22 @@ geom_xml2tree(struct gmesh *gmp, char *p)
return (ENOMEM);
}
mt->mesh = gmp;
+ mt->parser = parser;
+ error = 0;
XML_SetUserData(parser, mt);
XML_SetElementHandler(parser, StartElement, EndElement);
XML_SetCharacterDataHandler(parser, CharData);
i = XML_Parse(parser, p, strlen(p), 1);
+ if (mt->error != 0)
+ error = mt->error;
+ else if (i != 1) {
+ error = XML_GetErrorCode(parser) == XML_ERROR_NO_MEMORY ?
+ ENOMEM : EILSEQ;
+ }
XML_ParserFree(parser);
- if (i != 1) {
+ if (error != 0) {
free(mt);
- return (-1);
+ return (error);
}
gmp->lg_ident = calloc(sizeof *gmp->lg_ident, mt->nident + 1);
free(mt);
diff --git a/lib/libgpib/Makefile.depend b/lib/libgpib/Makefile.depend
new file mode 100644
index 0000000..ff699f7
--- /dev/null
+++ b/lib/libgpib/Makefile.depend
@@ -0,0 +1,15 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libgssapi/Makefile.depend b/lib/libgssapi/Makefile.depend
new file mode 100644
index 0000000..11612ba
--- /dev/null
+++ b/lib/libgssapi/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/gssapi \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libgssapi/gss_accept_sec_context.3 b/lib/libgssapi/gss_accept_sec_context.3
index 825c28d..cc36887 100644
--- a/lib/libgssapi/gss_accept_sec_context.3
+++ b/lib/libgssapi/gss_accept_sec_context.3
@@ -212,7 +212,7 @@ exist in version 1 of the GSS-API specification, so applications that
wish to run over version 1 implementations must special-case these
codes.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It input_chan_bindings"
.It context_handle
Context handle for new context.
Supply
@@ -400,7 +400,7 @@ Specify
Mechanism specific status code.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_DEFECTIVE_CREDENTIAL"
.It GSS_S_CONTINUE_NEEDED
Indicates that a token from the peer application is required to
complete the context,
@@ -442,7 +442,7 @@ the implementation or the provided credential.
.Xr gss_release_name 3 ,
.Xr gss_wrap 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_acquire_cred.3 b/lib/libgssapi/gss_acquire_cred.3
index 4b683e7..0a6caad 100644
--- a/lib/libgssapi/gss_acquire_cred.3
+++ b/lib/libgssapi/gss_acquire_cred.3
@@ -126,7 +126,7 @@ immediately following the call of
must return valid credential data,
and may therefore incur the overhead of a deferred credential acquisition.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It output_cred_handle"
.It desired_name
Name of principal whose credential should be acquired.
.It time_req
@@ -174,7 +174,7 @@ Specify NULL if not required.
Mechanism specific status code.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_CREDENTIALS_EXPIRED"
.It GSS_S_COMPLETE
Successful completion.
.It GSS_S_BAD_MECH
@@ -196,7 +196,7 @@ No credentials were found for the specified name.
.Xr gss_release_cred 3 ,
.Xr gss_release_oid_set 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_add_cred.3 b/lib/libgssapi/gss_add_cred.3
index 67ff1c3..32d9885 100644
--- a/lib/libgssapi/gss_add_cred.3
+++ b/lib/libgssapi/gss_add_cred.3
@@ -170,7 +170,7 @@ a non-
.Fa output_cred_handle
must be supplied.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It output_cred_handle"
.It minor_status
Mechanism specific status code.
.It input_cred_handle
@@ -270,7 +270,7 @@ Specify
if not required.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_CREDENTIALS_EXPIRED"
.It GSS_S_COMPLETE
Successful completion.
.It GSS_S_BAD_MECH
@@ -296,7 +296,7 @@ No credentials were found for the specified name.
.Xr gss_release_cred 3 ,
.Xr gss_release_oid_set 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_add_oid_set_member.3 b/lib/libgssapi/gss_add_oid_set_member.3
index 5839da6..e812681 100644
--- a/lib/libgssapi/gss_add_oid_set_member.3
+++ b/lib/libgssapi/gss_add_oid_set_member.3
@@ -71,7 +71,7 @@ the
.Fa oid_set
should remain unchanged.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It minor_status"
.It minor_status
Mechanism specific status code.
.It member_oid
@@ -80,7 +80,7 @@ The object identifier to copied into the set.
The set in which the object identifier should be inserted.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_COMPLETE"
.It GSS_S_COMPLETE
Successful completion
.El
@@ -88,7 +88,7 @@ Successful completion
.Xr gss_create_empty_oid_set 3 ,
.Xr gss_acquire_cred 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_canonicalize_name.3 b/lib/libgssapi/gss_canonicalize_name.3
index 036c0ef..71daad5 100644
--- a/lib/libgssapi/gss_canonicalize_name.3
+++ b/lib/libgssapi/gss_canonicalize_name.3
@@ -62,7 +62,7 @@ specifying
.Fa mech_type
as the authentication mechanism.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It minor_status"
.It minor_status
Mechanism specific status code.
.It input_name
@@ -79,7 +79,7 @@ after use with a call to
.Fn gss_release_name .
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_BAD_NAMETYPE"
.It GSS_S_COMPLETE
Successful completion.
.It GSS_S_BAD_MECH
@@ -95,7 +95,7 @@ The provided internal name was ill-formed.
.Xr gss_init_sec_context 3 ,
.Xr gss_release_name 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_compare_name.3 b/lib/libgssapi/gss_compare_name.3
index 713af23..0890cf9 100644
--- a/lib/libgssapi/gss_compare_name.3
+++ b/lib/libgssapi/gss_compare_name.3
@@ -54,7 +54,7 @@ denotes an anonymous principal,
the routines should indicate that the two names do not refer to the
same identity.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width "minor_status"
.It minor_status
Mechanism specific status code.
.It name1
@@ -62,7 +62,7 @@ Internal-form name.
.It name2
Internal-form name.
.It name_equal
-.Bl -tag
+.Bl -tag -width "non-zero"
.It non-zero
Names refer to same entity
.It zero
@@ -71,7 +71,7 @@ to refer to the same identity).
.El
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_BAD_NAMETYPE"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_BAD_NAMETYPE
@@ -80,7 +80,7 @@ The two names were of incomparable types.
One or both of name1 or name2 was ill-formed.
.El
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_context_time.3 b/lib/libgssapi/gss_context_time.3
index b6b4157..4dae1d9 100644
--- a/lib/libgssapi/gss_context_time.3
+++ b/lib/libgssapi/gss_context_time.3
@@ -47,7 +47,7 @@
Determines the number of seconds for which the specified context will
remain valid.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It context_handle"
.It minor_status
Mechanism specific status code.
.It context_handle
@@ -57,7 +57,7 @@ Number of seconds that the context will remain valid.
If the context has already expired, zero will be returned.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_CONTEXT_EXPIRED"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_CONTEXT_EXPIRED
@@ -66,7 +66,7 @@ The context has already expired
The context_handle parameter did not identify a valid context
.El
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_create_empty_oid_set.3 b/lib/libgssapi/gss_create_empty_oid_set.3
index 3a84f85..466ea01 100644
--- a/lib/libgssapi/gss_create_empty_oid_set.3
+++ b/lib/libgssapi/gss_create_empty_oid_set.3
@@ -51,7 +51,7 @@ These routines are intended to be used to construct sets of mechanism
object identifiers for input to
.Fn gss_acquire_cred .
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It minor_status"
.It minor_status
Mechanism specific status code.
.It oid_set
@@ -61,7 +61,7 @@ which the application must free after use with a call to
.Fn gss_release_oid_set .
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_COMPLETE"
.It GSS_S_COMPLETE
Successful completion
.El
@@ -69,7 +69,7 @@ Successful completion
.Xr gss_add_oid_set_member 3 ,
.Xr gss_acquire_cred 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_delete_sec_context.3 b/lib/libgssapi/gss_delete_sec_context.3
index 1c4fa7b..be12165 100644
--- a/lib/libgssapi/gss_delete_sec_context.3
+++ b/lib/libgssapi/gss_delete_sec_context.3
@@ -88,7 +88,7 @@ mechanisms are encouraged to return a zero-length token,
indicating that no peer action is necessary,
and that no token should be transferred by the application.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It context_handle"
.It minor_status
Mechanism specific status code.
.It context_handle
@@ -110,7 +110,7 @@ field of this token to zero to indicate to the application that no
token is to be sent to the peer.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It context_handle"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_NO_CONTEXT
@@ -121,7 +121,7 @@ No valid context was supplied
.Xr gss_init_sec_context 3 ,
.Xr gss_accept_sec_context 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_display_name.3 b/lib/libgssapi/gss_display_name.3
index 4944995..f22fcf5 100644
--- a/lib/libgssapi/gss_display_name.3
+++ b/lib/libgssapi/gss_display_name.3
@@ -76,7 +76,7 @@ via the
.Fa output_name_type
parameter.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It output_name_buffer"
.It minor_status
Mechanism specific status code.
.It input_name
@@ -98,7 +98,7 @@ Specify
if not required.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_COMPLETE"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_BAD_NAME
@@ -109,7 +109,7 @@ was ill-formed
.Xr gss_import_name 3 ,
.Xr gss_release_buffer 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_display_status.3 b/lib/libgssapi/gss_display_status.3
index 4bf908b..7c05e62 100644
--- a/lib/libgssapi/gss_display_status.3
+++ b/lib/libgssapi/gss_display_status.3
@@ -111,13 +111,13 @@ do {
} while (message_context != 0);
.Ed
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It minor_status"
.It minor_status
Mechanism specific status code.
.It status_value
Status value to be converted
.It status_type
-.Bl -tag
+.Bl -tag -width ".It GSS_C_MECH_CODE"
.It GSS_C_GSS_CODE
.Fa status_value
is a GSS status code
@@ -153,7 +153,7 @@ application after use with a call to
.Fn gss_release_buffer .
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_BAD_STATUS"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_BAD_MECH
@@ -168,7 +168,7 @@ nor
.Sh SEE ALSO
.Xr gss_release_buffer 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_duplicate_name.3 b/lib/libgssapi/gss_duplicate_name.3
index 5eb4a62..f9c9f83 100644
--- a/lib/libgssapi/gss_duplicate_name.3
+++ b/lib/libgssapi/gss_duplicate_name.3
@@ -57,7 +57,7 @@ and
must both be released,
and the release of one shall not affect the validity of the other).
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It minor_status"
.It minor_status
Mechanism specific status code.
.It src_name
@@ -70,7 +70,7 @@ after use with a call to
.Fn gss_release_name .
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_COMPLETE"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_BAD_NAME
@@ -81,7 +81,7 @@ parameter was ill-formed
.Sh SEE ALSO
.Xr gss_release_name 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_export_name.3 b/lib/libgssapi/gss_export_name.3
index 5cbf803..f727c45 100644
--- a/lib/libgssapi/gss_export_name.3
+++ b/lib/libgssapi/gss_export_name.3
@@ -58,7 +58,7 @@ parameter must specify a valid MN
or by
.Fn gss_canonicalize_name ).
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It exported_name"
.It minor_status
Mechanism specific status code.
.It input_name
@@ -71,7 +71,7 @@ after use with
.Fn gss_release_buffer .
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_BAD_NAMETYPE"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_NAME_NOT_MN
@@ -86,7 +86,7 @@ The internal name was of a type not supported by the GSS-API implementation.
.Xr gss_canonicalize_name 3 ,
.Xr gss_release_buffer 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_export_sec_context.3 b/lib/libgssapi/gss_export_sec_context.3
index 7ecbef3..ca1aedd 100644
--- a/lib/libgssapi/gss_export_sec_context.3
+++ b/lib/libgssapi/gss_export_sec_context.3
@@ -100,7 +100,7 @@ providing it also sets the
parameter to
.Dv GSS_C_NO_CONTEXT .
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It interprocess_token"
.It minor_status
Mechanism specific status code.
.It context_handle
@@ -112,7 +112,7 @@ after use with a call to
.Fn gss_release_buffer .
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_CONTEXT_EXPIRED"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_CONTEXT_EXPIRED
@@ -126,7 +126,7 @@ The operation is not supported
.Xr gss_import_sec_context 3 ,
.Xr gss_release_buffer 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_get_mic.3 b/lib/libgssapi/gss_get_mic.3
index e5d81fa..431f9e3 100644
--- a/lib/libgssapi/gss_get_mic.3
+++ b/lib/libgssapi/gss_get_mic.3
@@ -81,7 +81,7 @@ both to allow GSS-API V1 applications to link
and to retain the slight parameter type differences between the
obsolete versions of this routine and its current form.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It message_buffer"
.It minor_status
Mechanism specific status code.
.It context_handle
@@ -109,7 +109,7 @@ use with a call to
.Fn gss_release_buffer .
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_CONTEXT_EXPIRED"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_CONTEXT_EXPIRED
@@ -123,7 +123,7 @@ The specified QOP is not supported by the mechanism
.Xr gss_wrap 3 ,
.Xr gss_release_buffer 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_import_name.3 b/lib/libgssapi/gss_import_name.3
index aef1ae8..df3ce9c 100644
--- a/lib/libgssapi/gss_import_name.3
+++ b/lib/libgssapi/gss_import_name.3
@@ -59,7 +59,7 @@ parameter is of type
in which case the returned internal name will be an MN for the
mechanism that exported the name.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It input_name_buffer"
.It minor_status
Mechanism specific status code.
.It input_name_buffer
@@ -78,7 +78,7 @@ after use with a call to
.Fn gss_release_name .
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width "It GSS_S_BAD_NAMETYPE"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_BAD_NAMETYPE
@@ -97,7 +97,7 @@ but the mechanism contained within the input-name is not supported
.Sh SEE ALSO
.Xr gss_release_name 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_import_sec_context.3 b/lib/libgssapi/gss_import_sec_context.3
index 87aaa78..b2e1c78 100644
--- a/lib/libgssapi/gss_import_sec_context.3
+++ b/lib/libgssapi/gss_import_sec_context.3
@@ -50,7 +50,7 @@ A given interprocess token may be imported only once.
See
.Fn gss_export_sec_context .
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It interprocess_token"
.It minor_status
Mechanism specific status code.
.It interprocess_token
@@ -62,7 +62,7 @@ application after use with a call to
.Fn gss_delete_sec_context .
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_DEFECTIVE_TOKEN"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_NO_CONTEXT
@@ -78,7 +78,7 @@ Local policy prevents the import of this context by the current process
.Xr gss_export_sec_context 3 ,
.Xr gss_delete_sec_context 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_indicate_mechs.3 b/lib/libgssapi/gss_indicate_mechs.3
index 3eec861..c49c83a 100644
--- a/lib/libgssapi/gss_indicate_mechs.3
+++ b/lib/libgssapi/gss_indicate_mechs.3
@@ -46,7 +46,7 @@
Allows an application to determine which underlying security
mechanisms are available.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It minor_status"
.It minor_status
Mechanism specific status code.
.It mech_set
@@ -58,14 +58,14 @@ that should be released by the caller after use with a call to
.Fn gss_release_oid_set .
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_COMPLETE"
.It GSS_S_COMPLETE
Successful completion
.El
.Sh SEE ALSO
.Xr gss_release_oid_set 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_init_sec_context.3 b/lib/libgssapi/gss_init_sec_context.3
index 9d14859..51556a6 100644
--- a/lib/libgssapi/gss_init_sec_context.3
+++ b/lib/libgssapi/gss_init_sec_context.3
@@ -233,7 +233,7 @@ exist in version 1 of the GSS-API specification, so applications that
wish to run over version 1 implementations must special-case these
codes.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It initiator_cred_handle"
.It minor_status
Mechanism specific status code.
.It initiator_cred_handle
@@ -475,7 +475,7 @@ not support context expiration, the value
.Dv NULL if not required.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_CREDENTIALS_EXPIRED"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_CONTINUE_NEEDED
@@ -529,7 +529,7 @@ implementation.
.Xr gss_release_buffer 3 ,
.Xr gss_wrap 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_inquire_context.3 b/lib/libgssapi/gss_inquire_context.3
index ba5d649..d318234 100644
--- a/lib/libgssapi/gss_inquire_context.3
+++ b/lib/libgssapi/gss_inquire_context.3
@@ -55,7 +55,7 @@ The caller must already have obtained a handle that refers to the
context,
although the context need not be fully established.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It locally_initiated"
.It minor_status
Mechanism specific status code.
.It context_handle
@@ -229,7 +229,7 @@ Specify
if not required.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_NO_CONTEXT"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_NO_CONTEXT
@@ -242,7 +242,7 @@ The referenced context could not be accessed
.Xr gss_get_mic 3 ,
.Xr gss_export_sec_context 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_inquire_cred.3 b/lib/libgssapi/gss_inquire_cred.3
index 923b373..8bbe0da 100644
--- a/lib/libgssapi/gss_inquire_cred.3
+++ b/lib/libgssapi/gss_inquire_cred.3
@@ -50,7 +50,7 @@
.Sh DESCRIPTION
Obtains information about a credential.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It minor_status"
.It minor_status
Mechanism specific status code.
.It cred_handle
@@ -99,7 +99,7 @@ Specify
if not required.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_DEFECTIVE_CREDENTIAL"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_NO_CRED
@@ -116,7 +116,7 @@ it will be set to 0
.Xr gss_release_name 3 ,
.Xr gss_release_oid_set 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_inquire_cred_by_mech.3 b/lib/libgssapi/gss_inquire_cred_by_mech.3
index c316930..ebe6196 100644
--- a/lib/libgssapi/gss_inquire_cred_by_mech.3
+++ b/lib/libgssapi/gss_inquire_cred_by_mech.3
@@ -50,7 +50,7 @@
.Sh DESCRIPTION
Obtains per-mechanism information about a credential.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It initiator_lifetime"
.It minor_status
Mechanism specific status code.
.It cred_handle
@@ -114,7 +114,7 @@ Specify
if not required.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_DEFECTIVE_CREDENTIAL"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_NO_CRED
@@ -130,7 +130,7 @@ it will be set to 0.
.Sh SEE ALSO
.Xr gss_release_name 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_inquire_mechs_for_name.3 b/lib/libgssapi/gss_inquire_mechs_for_name.3
index d8d94ed..661f9ac 100644
--- a/lib/libgssapi/gss_inquire_mechs_for_name.3
+++ b/lib/libgssapi/gss_inquire_mechs_for_name.3
@@ -68,7 +68,7 @@ type).
Thus this routine should be used only as a pre-filter for a call to a
subsequent mechanism-specific routine.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It minor_status"
.It minor_status
Mechanism specific status code.
.It input_name
@@ -80,7 +80,7 @@ to
.Fn gss_release_oid_set .
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_COMPLETE"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_BAD_NAME
@@ -91,7 +91,7 @@ parameter was ill-formed
.Sh SEE ALSO
.Xr gss_release_oid_set 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_inquire_names_for_mech.3 b/lib/libgssapi/gss_inquire_names_for_mech.3
index c1b7528..591ddb9 100644
--- a/lib/libgssapi/gss_inquire_names_for_mech.3
+++ b/lib/libgssapi/gss_inquire_names_for_mech.3
@@ -46,7 +46,7 @@
.Sh DESCRIPTION
Returns the set of name-types supported by the specified mechanism.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It minor_status"
.It minor_status
Mechanism specific status code.
.It mechanism
@@ -58,14 +58,14 @@ call to
.Fn gss_release_oid_set .
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width "GSS_S_COMPLETEXX"
.It GSS_S_COMPLETE
Successful completion
.El
.Sh SEE ALSO
.Xr gss_release_oid_set 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_process_context_token.3 b/lib/libgssapi/gss_process_context_token.3
index 53f5ebf..a7e0ab4 100644
--- a/lib/libgssapi/gss_process_context_token.3
+++ b/lib/libgssapi/gss_process_context_token.3
@@ -71,7 +71,7 @@ believing that the context is fully established.
.Fn gss_process_context_token
provides a way to pass such a token to the mechanism at any time.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It context_handle"
.It minor_status
Mechanism specific status code.
.It context_handle
@@ -80,7 +80,7 @@ Context handle of context on which token is to be processed.
Token to process.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_DEFECTIVE_TOKEN"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_DEFECTIVE_TOKEN
@@ -94,7 +94,7 @@ did not refer to a valid context
.Xr gss_init_sec_context 3 ,
.Xr gss_accept_sec_context 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_release_buffer.3 b/lib/libgssapi/gss_release_buffer.3
index c4acf81..d71a6f2 100644
--- a/lib/libgssapi/gss_release_buffer.3
+++ b/lib/libgssapi/gss_release_buffer.3
@@ -55,7 +55,7 @@ Any buffer object returned by a GSS-API routine may be passed to
.Fn gss_release_buffer
(even if there is no storage associated with the buffer).
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It minor_status"
.It minor_status
Mechanism specific status code.
.It buffer
@@ -64,12 +64,12 @@ The gss_buffer_desc object will not be freed,
but its length field will be zeroed.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_COMPLETE"
.It GSS_S_COMPLETE
Successful completion
.El
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_release_cred.3 b/lib/libgssapi/gss_release_cred.3
index 38fc784..99377e5 100644
--- a/lib/libgssapi/gss_release_cred.3
+++ b/lib/libgssapi/gss_release_cred.3
@@ -50,7 +50,7 @@ Implementations are encouraged to set the cred_handle to
.Dv GSS_C_NO_CREDENTIAL
on successful completion of this call.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It minor_status"
.It minor_status
Mechanism specific status code.
.It cred_handle
@@ -59,14 +59,14 @@ If GSS_C_NO_CREDENTIAL is supplied,
the routine will complete successfully, but will do nothing.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_COMPLETE"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_NO_CRED
Credentials could not be accessed
.El
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_release_name.3 b/lib/libgssapi/gss_release_name.3
index ca737e0..b6f046e 100644
--- a/lib/libgssapi/gss_release_name.3
+++ b/lib/libgssapi/gss_release_name.3
@@ -48,21 +48,21 @@ Implementations are encouraged to set the name to
.Dv GSS_C_NO_NAME
on successful completion of this call.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It minor status"
.It minor_status
Mechanism specific status code.
.It name
The name to be deleted.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_COMPLETE"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_BAD_NAME
The name parameter did not contain a valid name
.El
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_release_oid_set.3 b/lib/libgssapi/gss_release_oid_set.3
index 7de4e9a..6685816 100644
--- a/lib/libgssapi/gss_release_oid_set.3
+++ b/lib/libgssapi/gss_release_oid_set.3
@@ -55,19 +55,19 @@ Implementations are encouraged to set the gss_OID_set parameter to
.Dv GSS_C_NO_OID_SET
on successful completion of this routine.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It minor_status"
.It minor_status
Mechanism specific status code.
.It set
The storage associated with the gss_OID_set will be deleted.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_COMPLETE"
.It GSS_S_COMPLETE
Successful completion
.El
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_test_oid_set_member.3 b/lib/libgssapi/gss_test_oid_set_member.3
index c6dad0f..5588e8a 100644
--- a/lib/libgssapi/gss_test_oid_set_member.3
+++ b/lib/libgssapi/gss_test_oid_set_member.3
@@ -54,7 +54,7 @@ and
.Fn gss_inquire_cred ,
but will also work with user-generated sets.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It minor_status"
.It minor_status
Mechanism specific status code.
.It member
@@ -65,7 +65,7 @@ The Object Identifier set.
Non-zero if the specified OID is a member of the set, zero if not.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_COMPLETE"
.It GSS_S_COMPLETE
Successful completion
.El
@@ -74,7 +74,7 @@ Successful completion
.Xr gss_acquire_cred 3 ,
.Xr gss_inquire_cred 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_unwrap.3 b/lib/libgssapi/gss_unwrap.3
index cc241f8..368b361 100644
--- a/lib/libgssapi/gss_unwrap.3
+++ b/lib/libgssapi/gss_unwrap.3
@@ -90,7 +90,7 @@ both to allow GSS-API V1 applications to link
and to retain the slight parameter type differences between the
obsolete versions of this routine and its current form.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It output_message_buffer"
.It minor_status
Mechanism specific status code.
.It context_handle
@@ -116,7 +116,7 @@ Specify NULL if not required.
Quality of protection provided. Specify NULL if not required.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_CONTEXT_EXPIRED"
.It GSS_S_COMPLETE
Successful completion.
.It GSS_S_DEFECTIVE_TOKEN
@@ -150,7 +150,7 @@ The context_handle parameter did not identify a valid context.
.Xr gss_wrap 3 ,
.Xr gss_release_buffer 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_verify_mic.3 b/lib/libgssapi/gss_verify_mic.3
index e8a4611..ae7cee2 100644
--- a/lib/libgssapi/gss_verify_mic.3
+++ b/lib/libgssapi/gss_verify_mic.3
@@ -81,7 +81,7 @@ both to allow GSS-API V1 applications to link
and to retain the slight parameter type differences between the
obsolete versions of this routine and its current form.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It context_handle"
.It minor_status
Mechanism specific status code.
.It context_handle
@@ -97,7 +97,7 @@ Specify
if not required.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_CONTEXT_EXPIRED"
.It GSS_S_COMPLETE
Successful completion
.It GSS_S_DEFECTIVE_TOKEN
@@ -130,7 +130,7 @@ The context_handle parameter did not identify a valid context
.Sh SEE ALSO
.Xr gss_wrap 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_wrap.3 b/lib/libgssapi/gss_wrap.3
index 5bf9cc2..edc1345 100644
--- a/lib/libgssapi/gss_wrap.3
+++ b/lib/libgssapi/gss_wrap.3
@@ -85,13 +85,13 @@ both to allow GSS-API V1 applications to link
and to retain the slight parameter type differences between the
obsolete versions of this routine and its current form.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It output_message_buffer"
.It minor_status
Mechanism specific status code.
.It context_handle
Identifies the context on which the message will be sent.
.It conf_req_flag
-.Bl -tag -width "Non-zero"
+.Bl -tag -width "Non-zero" -compact
.It Non-zero
Both confidentiality and integrity services are requested.
.It Zero
@@ -108,7 +108,7 @@ will return a major_status of
.It input_message_buffer
Message to be protected.
.It conf_state
-.Bl -tag -width "Non-zero"
+.Bl -tag -width "Non-zero" -compact
.It Non-zero
Confidentiality, data origin authentication and integrity services
have been applied.
@@ -123,7 +123,7 @@ with a call to
.Xr gss_release_buffer 3 .
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_CONTEXT_EXPIRED"
.It GSS_S_COMPLETE
Successful completion.
.It GSS_S_CONTEXT_EXPIRED
@@ -137,7 +137,7 @@ The specified QOP is not supported by the mechanism.
.Xr gss_unwrap 3 ,
.Xr gss_release_buffer 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gss_wrap_size_limit.3 b/lib/libgssapi/gss_wrap_size_limit.3
index 7a1cb59..afbff86 100644
--- a/lib/libgssapi/gss_wrap_size_limit.3
+++ b/lib/libgssapi/gss_wrap_size_limit.3
@@ -83,7 +83,7 @@ the implementation should not return a value via
.Dv max_input_bytes
that is greater than this length.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It req_output_size"
.It minor_status
Mechanism specific status code.
.It context_handle
@@ -109,7 +109,7 @@ be no larger than
bytes.
.El
.Sh RETURN VALUES
-.Bl -tag
+.Bl -tag -width ".It GSS_S_CONTEXT_EXPIRED"
.It GSS_S_COMPLETE
Successful completion.
.It GSS_S_NO_CONTEXT
@@ -122,7 +122,7 @@ The specified QOP is not supported by the mechanism.
.Sh SEE ALSO
.Xr gss_wrap 3
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/gssapi.3 b/lib/libgssapi/gssapi.3
index 121d9e4..d41595e 100644
--- a/lib/libgssapi/gssapi.3
+++ b/lib/libgssapi/gssapi.3
@@ -219,7 +219,7 @@ functionality is not available from the generic forms.
Applications are encouraged to use the generic routines wherever
possible on portability grounds.
.Sh STANDARDS
-.Bl -tag
+.Bl -tag -width ".It RFC 2743"
.It RFC 2743
Generic Security Service Application Program Interface Version 2, Update 1
.It RFC 2744
diff --git a/lib/libgssapi/mech.5 b/lib/libgssapi/mech.5
index b56565e..dd15ba9 100644
--- a/lib/libgssapi/mech.5
+++ b/lib/libgssapi/mech.5
@@ -39,17 +39,17 @@ The
file contains a list of installed GSS-API security mechanisms.
Each line of the file either contains a comment if the first character
is '#' or it contains five fields with the following meanings:
-.Bl -tag
+.Bl -tag -width ".It Object identifier"
.It Name
The name of this GSS-API mechanism.
.It Object identifier
The OID for this mechanism.
.It Library
A shared library containing the implementation of this mechanism.
-.It Kernel module (optional)
-A kernel module containing the implementation of this mechanism (not
+.It Kernel module
+Optional kernel module containing the implementation of this mechanism (not
yet supported in FreeBSD).
-.It Library options (optional)
+.It Library options
Optional parameters interpreted by the mechanism. Library options
must be enclosed in brackets ([ ]) to differentiate them from the
optional kernel module entry.
@@ -68,7 +68,7 @@ file contains a list of Quality of Protection values for use with
GSS-API.
Each line of the file either contains a comment if the first character
is '#' or it contains three fields with the following meanings:
-.Bl -tag
+.Bl -tag -width ".It Mechanism name"
.It QOP string
The name of this Quality of Protection algorithm.
.It QOP value
diff --git a/lib/libipsec/Makefile.depend b/lib/libipsec/Makefile.depend
new file mode 100644
index 0000000..bced0ef
--- /dev/null
+++ b/lib/libipsec/Makefile.depend
@@ -0,0 +1,26 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+policy_parse.So: policy_parse.c
+policy_parse.o: policy_parse.c
+policy_parse.po: policy_parse.c
+policy_token.So: policy_token.c
+policy_token.So: y.tab.h
+policy_token.o: policy_token.c
+policy_token.o: y.tab.h
+policy_token.po: policy_token.c
+policy_token.po: y.tab.h
+.endif
diff --git a/lib/libipx/Makefile.depend b/lib/libipx/Makefile.depend
new file mode 100644
index 0000000..e54ec8c
--- /dev/null
+++ b/lib/libipx/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libjail/Makefile.depend b/lib/libjail/Makefile.depend
new file mode 100644
index 0000000..e54ec8c
--- /dev/null
+++ b/lib/libjail/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libjail/jail.c b/lib/libjail/jail.c
index 5cd2ad2..207b9f2 100644
--- a/lib/libjail/jail.c
+++ b/lib/libjail/jail.c
@@ -85,19 +85,22 @@ jail_setv(int flags, ...)
(void)va_arg(tap, char *);
va_end(tap);
jp = alloca(njp * sizeof(struct jailparam));
- for (njp = 0; (name = va_arg(ap, char *)) != NULL; njp++) {
+ for (njp = 0; (name = va_arg(ap, char *)) != NULL;) {
value = va_arg(ap, char *);
- if (jailparam_init(jp + njp, name) < 0 ||
- jailparam_import(jp + njp, value) < 0) {
- jailparam_free(jp, njp);
- va_end(ap);
- return (-1);
- }
+ if (jailparam_init(jp + njp, name) < 0)
+ goto error;
+ if (jailparam_import(jp + njp++, value) < 0)
+ goto error;
}
va_end(ap);
jid = jailparam_set(jp, njp, flags);
jailparam_free(jp, njp);
return (jid);
+
+ error:
+ jailparam_free(jp, njp);
+ va_end(ap);
+ return (-1);
}
/*
@@ -195,7 +198,7 @@ jail_getv(int flags, ...)
int
jailparam_all(struct jailparam **jpp)
{
- struct jailparam *jp;
+ struct jailparam *jp, *tjp;
size_t mlen1, mlen2, buflen;
int njp, nlist;
int mib1[CTL_MAXNAME], mib2[CTL_MAXNAME - 2];
@@ -242,11 +245,10 @@ jailparam_all(struct jailparam **jpp)
/* Add the parameter to the list */
if (njp >= nlist) {
nlist *= 2;
- jp = realloc(jp, nlist * sizeof(*jp));
- if (jp == NULL) {
- jailparam_free(jp, njp);
- return (-1);
- }
+ tjp = realloc(jp, nlist * sizeof(*jp));
+ if (tjp == NULL)
+ goto error;
+ jp = tjp;
}
if (jailparam_init(jp + njp, buf + sizeof(SJPARAM)) < 0)
goto error;
@@ -277,6 +279,8 @@ jailparam_init(struct jailparam *jp, const char *name)
}
if (jailparam_type(jp) < 0) {
jailparam_free(jp, 1);
+ jp->jp_name = NULL;
+ jp->jp_value = NULL;
return (-1);
}
return (0);
diff --git a/lib/libkiconv/Makefile b/lib/libkiconv/Makefile
index ba88457..bda505e 100644
--- a/lib/libkiconv/Makefile
+++ b/lib/libkiconv/Makefile
@@ -1,9 +1,10 @@
# $FreeBSD$
+SHLIBDIR?= /lib
+
.include <bsd.own.mk>
LIB= kiconv
-SHLIBDIR?= /lib
SRCS= kiconv_sysctl.c xlat16_iconv.c xlat16_sysctl.c
SRCS+= quirks.c
diff --git a/lib/libkiconv/Makefile.depend b/lib/libkiconv/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libkiconv/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libkvm/Makefile.depend b/lib/libkvm/Makefile.depend
new file mode 100644
index 0000000..a839545
--- /dev/null
+++ b/lib/libkvm/Makefile.depend
@@ -0,0 +1,19 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libc \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libkvm/kvm_i386.c b/lib/libkvm/kvm_i386.c
index a92979f..601126b 100644
--- a/lib/libkvm/kvm_i386.c
+++ b/lib/libkvm/kvm_i386.c
@@ -238,7 +238,6 @@ _kvm_initvtop(kvm_t *kd)
return (-1);
}
kd->vmst->PTD = PTD;
- return (0);
kd->vmst->pae = 0;
}
return (0);
diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c
index 8fc415c..31258d7 100644
--- a/lib/libkvm/kvm_proc.c
+++ b/lib/libkvm/kvm_proc.c
@@ -144,6 +144,8 @@ kvm_proclist(kvm_t *kd, int what, int arg, struct proc *p,
_kvm_err(kd, kd->program, "can't read proc at %p", p);
return (-1);
}
+ if (proc.p_state == PRS_NEW)
+ continue;
if (proc.p_state != PRS_ZOMBIE) {
if (KREAD(kd, (u_long)TAILQ_FIRST(&proc.p_threads),
&mtd)) {
@@ -591,9 +593,15 @@ liveout:
nprocs = kvm_deadprocs(kd, op, arg, nl[1].n_value,
nl[2].n_value, nprocs);
+ if (nprocs <= 0) {
+ _kvm_freeprocs(kd);
+ nprocs = 0;
+ }
#ifdef notdef
- size = nprocs * sizeof(struct kinfo_proc);
- (void)realloc(kd->procbase, size);
+ else {
+ size = nprocs * sizeof(struct kinfo_proc);
+ kd->procbase = realloc(kd->procbase, size);
+ }
#endif
}
*cnt = nprocs;
diff --git a/lib/liblzma/Makefile.depend b/lib/liblzma/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/liblzma/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libmagic/Makefile b/lib/libmagic/Makefile
index fbf71ef..d341a3a 100644
--- a/lib/libmagic/Makefile
+++ b/lib/libmagic/Makefile
@@ -39,9 +39,9 @@ magic.mgc: mkmagic magic
CLEANFILES+= mkmagic
build-tools: mkmagic
-mkmagic: apprentice.c funcs.c getline.c magic.c print.c
- ${CC} ${CFLAGS} -DCOMPILE_ONLY -DHOSTPROG ${LDFLAGS} \
- -o ${.TARGET} ${.ALLSRC}
+mkmagic: apprentice.c encoding.c funcs.c magic.c print.c
+ ${CC} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} \
+ ${LDADD}
FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \
${.CURDIR}/config.h
diff --git a/lib/libmagic/Makefile.depend b/lib/libmagic/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libmagic/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libmagic/config.h b/lib/libmagic/config.h
index c17883f..c7e38ec 100644
--- a/lib/libmagic/config.h
+++ b/lib/libmagic/config.h
@@ -39,9 +39,7 @@
#define HAVE_FSEEKO 1
/* Define to 1 if you have the `getline' function. */
-#ifndef HOSTPROG
#define HAVE_GETLINE 1
-#endif
/* Define to 1 if you have the <getopt.h> header file. */
#define HAVE_GETOPT_H 1
diff --git a/lib/libmandoc/Makefile b/lib/libmandoc/Makefile
new file mode 100644
index 0000000..9fca07e
--- /dev/null
+++ b/lib/libmandoc/Makefile
@@ -0,0 +1,20 @@
+# $FreeBSD$
+
+MDOCMLDIR= ${.CURDIR}/../../contrib/mdocml
+.PATH: ${MDOCMLDIR}
+
+LIB= mandoc
+#NO_PIC=
+INTERNALLIB=
+MAN= mandoc.3
+SRCS= arch.c att.c chars.c \
+ compat_fgetln.c compat_getsubopt.c compat_strlcat.c compat_strlcpy.c \
+ eqn.c lib.c man.c man_hash.c man_macro.c man_validate.c mandoc.c \
+ mdoc.c mdoc_argv.c mdoc_hash.c mdoc_macro.c mdoc_validate.c \
+ msec.c read.c roff.c st.c \
+ tbl.c tbl_data.c tbl_layout.c tbl_opts.c vol.c
+
+WARNS?= 3
+CFLAGS+= -DHAVE_CONFIG_H -DVERSION="\"1.12.1\""
+
+.include <bsd.lib.mk>
diff --git a/lib/libmd/Makefile.depend b/lib/libmd/Makefile.depend
new file mode 100644
index 0000000..d342b5c
--- /dev/null
+++ b/lib/libmd/Makefile.depend
@@ -0,0 +1,37 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+md4hl.So: md4hl.c
+md4hl.o: md4hl.c
+md4hl.po: md4hl.c
+md5hl.So: md5hl.c
+md5hl.o: md5hl.c
+md5hl.po: md5hl.c
+rmd160hl.So: rmd160hl.c
+rmd160hl.o: rmd160hl.c
+rmd160hl.po: rmd160hl.c
+sha0hl.So: sha0hl.c
+sha0hl.o: sha0hl.c
+sha0hl.po: sha0hl.c
+sha1hl.So: sha1hl.c
+sha1hl.o: sha1hl.c
+sha1hl.po: sha1hl.c
+sha256hl.So: sha256hl.c
+sha256hl.o: sha256hl.c
+sha256hl.po: sha256hl.c
+sha512hl.So: sha512hl.c
+sha512hl.o: sha512hl.c
+sha512hl.po: sha512hl.c
+.endif
diff --git a/lib/libmemstat/Makefile.depend b/lib/libmemstat/Makefile.depend
new file mode 100644
index 0000000..4db4c88
--- /dev/null
+++ b/lib/libmemstat/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libkvm \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libmemstat/memstat_uma.c b/lib/libmemstat/memstat_uma.c
index 35f6dad..040198c 100644
--- a/lib/libmemstat/memstat_uma.c
+++ b/lib/libmemstat/memstat_uma.c
@@ -254,7 +254,7 @@ kread(kvm_t *kvm, void *kvm_pointer, void *address, size_t size,
}
static int
-kread_string(kvm_t *kvm, void *kvm_pointer, char *buffer, int buflen)
+kread_string(kvm_t *kvm, const void *kvm_pointer, char *buffer, int buflen)
{
ssize_t ret;
int i;
diff --git a/lib/libmilter/Makefile.depend b/lib/libmilter/Makefile.depend
new file mode 100644
index 0000000..be77ccf
--- /dev/null
+++ b/lib/libmilter/Makefile.depend
@@ -0,0 +1,54 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+ lib/libutil \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+comm.So: sm_os.h
+comm.o: sm_os.h
+comm.po: sm_os.h
+engine.So: sm_os.h
+engine.o: sm_os.h
+engine.po: sm_os.h
+errstring.So: sm_os.h
+errstring.o: sm_os.h
+errstring.po: sm_os.h
+handler.So: sm_os.h
+handler.o: sm_os.h
+handler.po: sm_os.h
+listener.So: sm_os.h
+listener.o: sm_os.h
+listener.po: sm_os.h
+main.So: sm_os.h
+main.o: sm_os.h
+main.po: sm_os.h
+monitor.So: sm_os.h
+monitor.o: sm_os.h
+monitor.po: sm_os.h
+signal.So: sm_os.h
+signal.o: sm_os.h
+signal.po: sm_os.h
+sm_gethost.So: sm_os.h
+sm_gethost.o: sm_os.h
+sm_gethost.po: sm_os.h
+smfi.So: sm_os.h
+smfi.o: sm_os.h
+smfi.po: sm_os.h
+strl.So: sm_os.h
+strl.o: sm_os.h
+strl.po: sm_os.h
+worker.So: sm_os.h
+worker.o: sm_os.h
+worker.po: sm_os.h
+.endif
diff --git a/lib/libmp/Makefile.depend b/lib/libmp/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libmp/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libncp/Makefile.depend b/lib/libncp/Makefile.depend
new file mode 100644
index 0000000..29fda55
--- /dev/null
+++ b/lib/libncp/Makefile.depend
@@ -0,0 +1,14 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libnetgraph/Makefile.depend b/lib/libnetgraph/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libnetgraph/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libngatm/Makefile.depend b/lib/libngatm/Makefile.depend
new file mode 100644
index 0000000..e54ec8c
--- /dev/null
+++ b/lib/libngatm/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libopie/Makefile.depend b/lib/libopie/Makefile.depend
new file mode 100644
index 0000000..22f59e0
--- /dev/null
+++ b/lib/libopie/Makefile.depend
@@ -0,0 +1,18 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+ lib/libmd \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/libpam/Makefile.depend b/lib/libpam/libpam/Makefile.depend
new file mode 100644
index 0000000..5d23c5e
--- /dev/null
+++ b/lib/libpam/libpam/Makefile.depend
@@ -0,0 +1,40 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libpam/modules/pam_chroot \
+ lib/libpam/modules/pam_deny \
+ lib/libpam/modules/pam_echo \
+ lib/libpam/modules/pam_exec \
+ lib/libpam/modules/pam_ftpusers \
+ lib/libpam/modules/pam_group \
+ lib/libpam/modules/pam_guest \
+ lib/libpam/modules/pam_krb5 \
+ lib/libpam/modules/pam_ksu \
+ lib/libpam/modules/pam_lastlog \
+ lib/libpam/modules/pam_login_access \
+ lib/libpam/modules/pam_nologin \
+ lib/libpam/modules/pam_opie \
+ lib/libpam/modules/pam_opieaccess \
+ lib/libpam/modules/pam_passwdqc \
+ lib/libpam/modules/pam_permit \
+ lib/libpam/modules/pam_radius \
+ lib/libpam/modules/pam_rhosts \
+ lib/libpam/modules/pam_rootok \
+ lib/libpam/modules/pam_securetty \
+ lib/libpam/modules/pam_self \
+ lib/libpam/modules/pam_ssh \
+ lib/libpam/modules/pam_tacplus \
+ lib/libpam/modules/pam_unix \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_chroot/Makefile.depend b/lib/libpam/modules/pam_chroot/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libpam/modules/pam_chroot/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_deny/Makefile.depend b/lib/libpam/modules/pam_deny/Makefile.depend
new file mode 100644
index 0000000..ff699f7
--- /dev/null
+++ b/lib/libpam/modules/pam_deny/Makefile.depend
@@ -0,0 +1,15 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_echo/Makefile.depend b/lib/libpam/modules/pam_echo/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libpam/modules/pam_echo/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_exec/Makefile.depend b/lib/libpam/modules/pam_exec/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libpam/modules/pam_exec/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_ftpusers/Makefile.depend b/lib/libpam/modules/pam_ftpusers/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libpam/modules/pam_ftpusers/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_group/Makefile.depend b/lib/libpam/modules/pam_group/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libpam/modules/pam_group/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_guest/Makefile.depend b/lib/libpam/modules/pam_guest/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libpam/modules/pam_guest/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_krb5/Makefile.depend b/lib/libpam/modules/pam_krb5/Makefile.depend
new file mode 100644
index 0000000..eb4d075
--- /dev/null
+++ b/lib/libpam/modules/pam_krb5/Makefile.depend
@@ -0,0 +1,19 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ kerberos5/lib/libasn1 \
+ kerberos5/lib/libkrb5 \
+ lib/libcom_err \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_krb5/pam_krb5.c b/lib/libpam/modules/pam_krb5/pam_krb5.c
index 602718f..19592e3 100644
--- a/lib/libpam/modules/pam_krb5/pam_krb5.c
+++ b/lib/libpam/modules/pam_krb5/pam_krb5.c
@@ -91,6 +91,7 @@ static void compat_free_data_contents(krb5_context, krb5_data *);
#define PAM_OPT_NO_CCACHE "no_ccache"
#define PAM_OPT_NO_USER_CHECK "no_user_check"
#define PAM_OPT_REUSE_CCACHE "reuse_ccache"
+#define PAM_OPT_NO_USER_CHECK "no_user_check"
#define PAM_LOG_KRB5_ERR(ctx, rv, fmt, ...) \
do { \
@@ -218,10 +219,12 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused,
PAM_LOG("PAM_USER Redone");
}
- pwd = getpwnam(user);
- if (pwd == NULL) {
- retval = PAM_USER_UNKNOWN;
- goto cleanup2;
+ if (!openpam_get_option(pamh, PAM_OPT_NO_USER_CHECK)) {
+ pwd = getpwnam(user);
+ if (pwd == NULL) {
+ retval = PAM_USER_UNKNOWN;
+ goto cleanup2;
+ }
}
PAM_LOG("Done getpwnam()");
@@ -335,11 +338,11 @@ cleanup:
PAM_LOG("Done cleanup");
cleanup2:
krb5_free_principal(pam_context, princ);
- PAM_LOG("Done cleanup2");
-cleanup3:
if (princ_name)
free(princ_name);
+ PAM_LOG("Done cleanup2");
+cleanup3:
krb5_free_context(pam_context);
PAM_LOG("Done cleanup3");
@@ -647,7 +650,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags __unused,
if (krbret != 0) {
PAM_LOG_KRB5_ERR(pam_context, krbret,
"Error krb5_cc_get_principal()");
- retval = PAM_PERM_DENIED;;
+ retval = PAM_PERM_DENIED;
goto cleanup;
}
@@ -802,11 +805,11 @@ cleanup:
PAM_LOG("Done cleanup");
cleanup2:
krb5_free_principal(pam_context, princ);
- PAM_LOG("Done cleanup2");
-cleanup3:
if (princ_name)
free(princ_name);
+ PAM_LOG("Done cleanup2");
+cleanup3:
krb5_free_context(pam_context);
PAM_LOG("Done cleanup3");
diff --git a/lib/libpam/modules/pam_ksu/Makefile.depend b/lib/libpam/modules/pam_ksu/Makefile.depend
new file mode 100644
index 0000000..a35745a
--- /dev/null
+++ b/lib/libpam/modules/pam_ksu/Makefile.depend
@@ -0,0 +1,18 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ kerberos5/lib/libasn1 \
+ kerberos5/lib/libkrb5 \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_lastlog/Makefile.depend b/lib/libpam/modules/pam_lastlog/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libpam/modules/pam_lastlog/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_lastlog/pam_lastlog.8 b/lib/libpam/modules/pam_lastlog/pam_lastlog.8
index 8ee5dec..cd75fff 100644
--- a/lib/libpam/modules/pam_lastlog/pam_lastlog.8
+++ b/lib/libpam/modules/pam_lastlog/pam_lastlog.8
@@ -34,7 +34,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 24, 2002
+.Dd January 21, 2010
.Dt PAM_LASTLOG 8
.Os
.Sh NAME
diff --git a/lib/libpam/modules/pam_login_access/Makefile.depend b/lib/libpam/modules/pam_login_access/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libpam/modules/pam_login_access/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_nologin/Makefile.depend b/lib/libpam/modules/pam_nologin/Makefile.depend
new file mode 100644
index 0000000..4046f0e
--- /dev/null
+++ b/lib/libpam/modules/pam_nologin/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libutil \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_opie/Makefile.depend b/lib/libpam/modules/pam_opie/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libpam/modules/pam_opie/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_opieaccess/Makefile.depend b/lib/libpam/modules/pam_opieaccess/Makefile.depend
new file mode 100644
index 0000000..ff699f7
--- /dev/null
+++ b/lib/libpam/modules/pam_opieaccess/Makefile.depend
@@ -0,0 +1,15 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_passwdqc/Makefile.depend b/lib/libpam/modules/pam_passwdqc/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libpam/modules/pam_passwdqc/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_permit/Makefile.depend b/lib/libpam/modules/pam_permit/Makefile.depend
new file mode 100644
index 0000000..ff699f7
--- /dev/null
+++ b/lib/libpam/modules/pam_permit/Makefile.depend
@@ -0,0 +1,15 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_radius/Makefile.depend b/lib/libpam/modules/pam_radius/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libpam/modules/pam_radius/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_radius/pam_radius.c b/lib/libpam/modules/pam_radius/pam_radius.c
index 306c4b7..c5d4dd4 100644
--- a/lib/libpam/modules/pam_radius/pam_radius.c
+++ b/lib/libpam/modules/pam_radius/pam_radius.c
@@ -38,7 +38,6 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <pwd.h>
diff --git a/lib/libpam/modules/pam_rhosts/Makefile.depend b/lib/libpam/modules/pam_rhosts/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libpam/modules/pam_rhosts/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_rootok/Makefile.depend b/lib/libpam/modules/pam_rootok/Makefile.depend
new file mode 100644
index 0000000..ff699f7
--- /dev/null
+++ b/lib/libpam/modules/pam_rootok/Makefile.depend
@@ -0,0 +1,15 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_securetty/Makefile.depend b/lib/libpam/modules/pam_securetty/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libpam/modules/pam_securetty/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_self/Makefile.depend b/lib/libpam/modules/pam_self/Makefile.depend
new file mode 100644
index 0000000..ff699f7
--- /dev/null
+++ b/lib/libpam/modules/pam_self/Makefile.depend
@@ -0,0 +1,15 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_ssh/Makefile.depend b/lib/libpam/modules/pam_ssh/Makefile.depend
new file mode 100644
index 0000000..cc2d1b6
--- /dev/null
+++ b/lib/libpam/modules/pam_ssh/Makefile.depend
@@ -0,0 +1,18 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+ lib/libutil \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_tacplus/Makefile.depend b/lib/libpam/modules/pam_tacplus/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libpam/modules/pam_tacplus/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_unix/Makefile.depend b/lib/libpam/modules/pam_unix/Makefile.depend
new file mode 100644
index 0000000..cc2d1b6
--- /dev/null
+++ b/lib/libpam/modules/pam_unix/Makefile.depend
@@ -0,0 +1,18 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+ lib/libutil \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/modules/pam_unix/pam_unix.c b/lib/libpam/modules/pam_unix/pam_unix.c
index 415004a..5881ecf 100644
--- a/lib/libpam/modules/pam_unix/pam_unix.c
+++ b/lib/libpam/modules/pam_unix/pam_unix.c
@@ -94,13 +94,13 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused,
const char *pass, *user, *realpw, *prompt;
if (openpam_get_option(pamh, PAM_OPT_AUTH_AS_SELF)) {
- pwd = getpwnam(getlogin());
+ user = getlogin();
} else {
retval = pam_get_user(pamh, &user, NULL);
if (retval != PAM_SUCCESS)
return (retval);
- pwd = getpwnam(user);
}
+ pwd = getpwnam(user);
PAM_LOG("Got user: %s", user);
diff --git a/lib/libpcap/Makefile.depend b/lib/libpcap/Makefile.depend
new file mode 100644
index 0000000..5d469eb
--- /dev/null
+++ b/lib/libpcap/Makefile.depend
@@ -0,0 +1,32 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+grammar.So: grammar.c
+grammar.o: grammar.c
+grammar.po: grammar.c
+pcap.So: version.h
+pcap.o: version.h
+pcap.po: version.h
+scanner.So: scanner.c
+scanner.So: tokdefs.h
+scanner.o: scanner.c
+scanner.o: tokdefs.h
+scanner.po: scanner.c
+scanner.po: tokdefs.h
+version.So: version.c
+version.o: version.c
+version.po: version.c
+.endif
diff --git a/lib/libpcap/config.h b/lib/libpcap/config.h
index b364c13..379772b 100644
--- a/lib/libpcap/config.h
+++ b/lib/libpcap/config.h
@@ -221,7 +221,7 @@
/* #undef NETINET_ETHER_H_DECLARES_ETHER_HOSTTON */
/* Define to 1 if netinet/if_ether.h declares `ether_hostton' */
-#define NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON
+#define NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON /**/
/* do not use protochain */
/* #undef NO_PROTOCHAIN */
@@ -238,6 +238,9 @@
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
@@ -250,6 +253,9 @@
/* target host supports CAN sniffing */
/* #undef PCAP_SUPPORT_CAN */
+/* target host supports canusb */
+/* #undef PCAP_SUPPORT_CANUSB */
+
/* target host supports netfilter sniffing */
/* #undef PCAP_SUPPORT_NETFILTER */
diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile
index 5edbfe6..f59dc2b 100644
--- a/lib/libpmc/Makefile
+++ b/lib/libpmc/Makefile
@@ -28,6 +28,7 @@ MAN+= pmc.atom.3
MAN+= pmc.core.3
MAN+= pmc.core2.3
MAN+= pmc.iaf.3
+MAN+= pmc.ivybridge.3
MAN+= pmc.ucf.3
MAN+= pmc.k7.3
MAN+= pmc.k8.3
@@ -38,10 +39,11 @@ MAN+= pmc.corei7.3
MAN+= pmc.corei7uc.3
MAN+= pmc.sandybridge.3
MAN+= pmc.sandybridgeuc.3
+MAN+= pmc.sandybridgexeon.3
MAN+= pmc.westmere.3
MAN+= pmc.westmereuc.3
MAN+= pmc.tsc.3
-.elif ${MACHINE_CPUARCH} == "arm" && ${CPUTYPE} == "xscale"
+.elif ${MACHINE_CPUARCH} == "arm"
MAN+= pmc.xscale.3
.elif ${MACHINE_CPUARCH} == "mips"
MAN+= pmc.mips24k.3
diff --git a/lib/libpmc/Makefile.depend b/lib/libpmc/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libpmc/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpmc/libpmc.c b/lib/libpmc/libpmc.c
index 3b7dc37..85c460d 100644
--- a/lib/libpmc/libpmc.c
+++ b/lib/libpmc/libpmc.c
@@ -183,11 +183,21 @@ static const struct pmc_event_descr corei7_event_table[] =
__PMC_EV_ALIAS_COREI7()
};
+static const struct pmc_event_descr ivybridge_event_table[] =
+{
+ __PMC_EV_ALIAS_IVYBRIDGE()
+};
+
static const struct pmc_event_descr sandybridge_event_table[] =
{
__PMC_EV_ALIAS_SANDYBRIDGE()
};
+static const struct pmc_event_descr sandybridge_xeon_event_table[] =
+{
+ __PMC_EV_ALIAS_SANDYBRIDGE_XEON()
+};
+
static const struct pmc_event_descr westmere_event_table[] =
{
__PMC_EV_ALIAS_WESTMERE()
@@ -222,7 +232,9 @@ PMC_MDEP_TABLE(atom, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC);
PMC_MDEP_TABLE(core, IAP, PMC_CLASS_SOFT, PMC_CLASS_TSC);
PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC);
PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP);
+PMC_MDEP_TABLE(ivybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC);
PMC_MDEP_TABLE(sandybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP);
+PMC_MDEP_TABLE(sandybridge_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC);
PMC_MDEP_TABLE(westmere, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP);
PMC_MDEP_TABLE(k7, K7, PMC_CLASS_SOFT, PMC_CLASS_TSC);
PMC_MDEP_TABLE(k8, K8, PMC_CLASS_SOFT, PMC_CLASS_TSC);
@@ -259,7 +271,9 @@ PMC_CLASS_TABLE_DESC(atom, IAP, atom, iap);
PMC_CLASS_TABLE_DESC(core, IAP, core, iap);
PMC_CLASS_TABLE_DESC(core2, IAP, core2, iap);
PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap);
+PMC_CLASS_TABLE_DESC(ivybridge, IAP, ivybridge, iap);
PMC_CLASS_TABLE_DESC(sandybridge, IAP, sandybridge, iap);
+PMC_CLASS_TABLE_DESC(sandybridge_xeon, IAP, sandybridge_xeon, iap);
PMC_CLASS_TABLE_DESC(westmere, IAP, westmere, iap);
PMC_CLASS_TABLE_DESC(ucf, UCF, ucf, ucf);
PMC_CLASS_TABLE_DESC(corei7uc, UCP, corei7uc, ucp);
@@ -365,14 +379,14 @@ static struct pmc_op_getdyneventinfo soft_event_info;
/* Event masks for events */
struct pmc_masks {
const char *pm_name;
- const uint32_t pm_value;
+ const uint64_t pm_value;
};
#define PMCMASK(N,V) { .pm_name = #N, .pm_value = (V) }
#define NULLMASK { .pm_name = NULL }
#if defined(__amd64__) || defined(__i386__)
static int
-pmc_parse_mask(const struct pmc_masks *pmask, char *p, uint32_t *evmask)
+pmc_parse_mask(const struct pmc_masks *pmask, char *p, uint64_t *evmask)
{
const struct pmc_masks *pm;
char *q, *r;
@@ -561,8 +575,12 @@ static struct pmc_event_alias core2_aliases_without_iaf[] = {
#define atom_aliases_without_iaf core2_aliases_without_iaf
#define corei7_aliases core2_aliases
#define corei7_aliases_without_iaf core2_aliases_without_iaf
+#define ivybridge_aliases core2_aliases
+#define ivybridge_aliases_without_iaf core2_aliases_without_iaf
#define sandybridge_aliases core2_aliases
#define sandybridge_aliases_without_iaf core2_aliases_without_iaf
+#define sandybridge_xeon_aliases core2_aliases
+#define sandybridge_xeon_aliases_without_iaf core2_aliases_without_iaf
#define westmere_aliases core2_aliases
#define westmere_aliases_without_iaf core2_aliases_without_iaf
@@ -663,7 +681,7 @@ static struct pmc_masks iap_transition_mask[] = {
NULLMASK
};
-static struct pmc_masks iap_rsp_mask[] = {
+static struct pmc_masks iap_rsp_mask_i7_wm[] = {
PMCMASK(DMND_DATA_RD, (1 << 0)),
PMCMASK(DMND_RFO, (1 << 1)),
PMCMASK(DMND_IFETCH, (1 << 2)),
@@ -682,12 +700,43 @@ static struct pmc_masks iap_rsp_mask[] = {
NULLMASK
};
+static struct pmc_masks iap_rsp_mask_sb_sbx_ib[] = {
+ PMCMASK(REQ_DMND_DATA_RD, (1ULL << 0)),
+ PMCMASK(REQ_DMND_RFO, (1ULL << 1)),
+ PMCMASK(REQ_DMND_IFETCH, (1ULL << 2)),
+ PMCMASK(REQ_WB, (1ULL << 3)),
+ PMCMASK(REQ_PF_DATA_RD, (1ULL << 4)),
+ PMCMASK(REQ_PF_RFO, (1ULL << 5)),
+ PMCMASK(REQ_PF_IFETCH, (1ULL << 6)),
+ PMCMASK(REQ_PF_LLC_DATA_RD, (1ULL << 7)),
+ PMCMASK(REQ_PF_LLC_RFO, (1ULL << 8)),
+ PMCMASK(REQ_PF_LLC_IFETCH, (1ULL << 9)),
+ PMCMASK(REQ_BUS_LOCKS, (1ULL << 10)),
+ PMCMASK(REQ_STRM_ST, (1ULL << 11)),
+ PMCMASK(REQ_OTHER, (1ULL << 15)),
+ PMCMASK(RES_ANY, (1ULL << 16)),
+ PMCMASK(RES_SUPPLIER_SUPP, (1ULL << 17)),
+ PMCMASK(RES_SUPPLIER_LLC_HITM, (1ULL << 18)),
+ PMCMASK(RES_SUPPLIER_LLC_HITE, (1ULL << 19)),
+ PMCMASK(RES_SUPPLIER_LLC_HITS, (1ULL << 20)),
+ PMCMASK(RES_SUPPLIER_LLC_HITF, (1ULL << 21)),
+ PMCMASK(RES_SUPPLIER_LOCAL, (1ULL << 22)),
+ PMCMASK(RES_SNOOP_SNP_NONE, (1ULL << 31)),
+ PMCMASK(RES_SNOOP_SNP_NO_NEEDED,(1ULL << 32)),
+ PMCMASK(RES_SNOOP_SNP_MISS, (1ULL << 33)),
+ PMCMASK(RES_SNOOP_HIT_NO_FWD, (1ULL << 34)),
+ PMCMASK(RES_SNOOP_HIT_FWD, (1ULL << 35)),
+ PMCMASK(RES_SNOOP_HITM, (1ULL << 36)),
+ PMCMASK(RES_NON_DRAM, (1ULL << 37)),
+ NULLMASK
+};
+
static int
iap_allocate_pmc(enum pmc_event pe, char *ctrspec,
struct pmc_op_pmcallocate *pmc_config)
{
char *e, *p, *q;
- uint32_t cachestate, evmask, rsp;
+ uint64_t cachestate, evmask, rsp;
int count, n;
pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE |
@@ -753,7 +802,14 @@ iap_allocate_pmc(enum pmc_event pe, char *ctrspec,
} else if (cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7 ||
cpu_info.pm_cputype == PMC_CPU_INTEL_WESTMERE) {
if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) {
- n = pmc_parse_mask(iap_rsp_mask, p, &rsp);
+ n = pmc_parse_mask(iap_rsp_mask_i7_wm, p, &rsp);
+ } else
+ return (-1);
+ } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_SANDYBRIDGE ||
+ cpu_info.pm_cputype == PMC_CPU_INTEL_SANDYBRIDGE_XEON ||
+ cpu_info.pm_cputype == PMC_CPU_INTEL_IVYBRIDGE) {
+ if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) {
+ n = pmc_parse_mask(iap_rsp_mask_sb_sbx_ib, p, &rsp);
} else
return (-1);
} else
@@ -1072,7 +1128,8 @@ k8_allocate_pmc(enum pmc_event pe, char *ctrspec,
{
char *e, *p, *q;
int n;
- uint32_t count, evmask;
+ uint32_t count;
+ uint64_t evmask;
const struct pmc_masks *pm, *pmask;
pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE);
@@ -1554,7 +1611,8 @@ p4_allocate_pmc(enum pmc_event pe, char *ctrspec,
char *e, *p, *q;
int count, has_tag, has_busreqtype, n;
- uint32_t evmask, cccractivemask;
+ uint32_t cccractivemask;
+ uint64_t evmask;
const struct pmc_masks *pm, *pmask;
pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE);
@@ -1982,7 +2040,7 @@ p6_allocate_pmc(enum pmc_event pe, char *ctrspec,
struct pmc_op_pmcallocate *pmc_config)
{
char *e, *p, *q;
- uint32_t evmask;
+ uint64_t evmask;
int count, n;
const struct pmc_masks *pm, *pmask;
@@ -2622,10 +2680,18 @@ pmc_event_names_of_class(enum pmc_class cl, const char ***eventnames,
ev = corei7_event_table;
count = PMC_EVENT_TABLE_SIZE(corei7);
break;
+ case PMC_CPU_INTEL_IVYBRIDGE:
+ ev = ivybridge_event_table;
+ count = PMC_EVENT_TABLE_SIZE(ivybridge);
+ break;
case PMC_CPU_INTEL_SANDYBRIDGE:
ev = sandybridge_event_table;
count = PMC_EVENT_TABLE_SIZE(sandybridge);
break;
+ case PMC_CPU_INTEL_SANDYBRIDGE_XEON:
+ ev = sandybridge_xeon_event_table;
+ count = PMC_EVENT_TABLE_SIZE(sandybridge_xeon);
+ break;
case PMC_CPU_INTEL_WESTMERE:
ev = westmere_event_table;
count = PMC_EVENT_TABLE_SIZE(westmere);
@@ -2914,11 +2980,17 @@ pmc_init(void)
pmc_class_table[n++] = &corei7uc_class_table_descr;
PMC_MDEP_INIT_INTEL_V2(corei7);
break;
+ case PMC_CPU_INTEL_IVYBRIDGE:
+ PMC_MDEP_INIT_INTEL_V2(ivybridge);
+ break;
case PMC_CPU_INTEL_SANDYBRIDGE:
pmc_class_table[n++] = &ucf_class_table_descr;
pmc_class_table[n++] = &sandybridgeuc_class_table_descr;
PMC_MDEP_INIT_INTEL_V2(sandybridge);
break;
+ case PMC_CPU_INTEL_SANDYBRIDGE_XEON:
+ PMC_MDEP_INIT_INTEL_V2(sandybridge_xeon);
+ break;
case PMC_CPU_INTEL_WESTMERE:
pmc_class_table[n++] = &ucf_class_table_descr;
pmc_class_table[n++] = &westmereuc_class_table_descr;
@@ -3049,10 +3121,18 @@ _pmc_name_of_event(enum pmc_event pe, enum pmc_cputype cpu)
ev = corei7_event_table;
evfence = corei7_event_table + PMC_EVENT_TABLE_SIZE(corei7);
break;
+ case PMC_CPU_INTEL_IVYBRIDGE:
+ ev = ivybridge_event_table;
+ evfence = ivybridge_event_table + PMC_EVENT_TABLE_SIZE(ivybridge);
+ break;
case PMC_CPU_INTEL_SANDYBRIDGE:
ev = sandybridge_event_table;
evfence = sandybridge_event_table + PMC_EVENT_TABLE_SIZE(sandybridge);
break;
+ case PMC_CPU_INTEL_SANDYBRIDGE_XEON:
+ ev = sandybridge_xeon_event_table;
+ evfence = sandybridge_xeon_event_table + PMC_EVENT_TABLE_SIZE(sandybridge_xeon);
+ break;
case PMC_CPU_INTEL_WESTMERE:
ev = westmere_event_table;
evfence = westmere_event_table + PMC_EVENT_TABLE_SIZE(westmere);
diff --git a/lib/libpmc/pmc.ivybridge.3 b/lib/libpmc/pmc.ivybridge.3
new file mode 100644
index 0000000..9a81da4
--- /dev/null
+++ b/lib/libpmc/pmc.ivybridge.3
@@ -0,0 +1,880 @@
+.\" Copyright (c) 2012 Fabien Thomas. 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$
+.\"
+.Dd October 19, 2012
+.Dt PMC.IVYBRIDGE 3
+.Os
+.Sh NAME
+.Nm pmc.ivybridge
+.Nd measurement events for
+.Tn Intel
+.Tn Ivy Bridge
+family CPUs
+.Sh LIBRARY
+.Lb libpmc
+.Sh SYNOPSIS
+.In pmc.h
+.Sh DESCRIPTION
+.Tn Intel
+.Tn "Ivy Bridge"
+CPUs contain PMCs conforming to version 2 of the
+.Tn Intel
+performance measurement architecture.
+These CPUs may contain up to three classes of PMCs:
+.Bl -tag -width "Li PMC_CLASS_IAP"
+.It Li PMC_CLASS_IAF
+Fixed-function counters that count only one hardware event per counter.
+.It Li PMC_CLASS_IAP
+Programmable counters that may be configured to count one of a defined
+set of hardware events.
+.El
+.Pp
+The number of PMCs available in each class and their widths need to be
+determined at run time by calling
+.Xr pmc_cpuinfo 3 .
+.Pp
+Intel Ivy Bridge PMCs are documented in
+.Rs
+.%B "Intel(R) 64 and IA-32 Architectures Software Developer's Manual"
+.%T "Volume 3B: System Programming Guide, Part 2"
+.%N "Order Number: 253669-043US"
+.%D May 2012
+.%Q "Intel Corporation"
+.Re
+.Ss IVYBRIDGE FIXED FUNCTION PMCS
+These PMCs and their supported events are documented in
+.Xr pmc.iaf 3 .
+.Ss IVYBRIDGE PROGRAMMABLE PMCS
+The programmable PMCs support the following capabilities:
+.Bl -column "PMC_CAP_INTERRUPT" "Support"
+.It Em Capability Ta Em Support
+.It PMC_CAP_CASCADE Ta \&No
+.It PMC_CAP_EDGE Ta Yes
+.It PMC_CAP_INTERRUPT Ta Yes
+.It PMC_CAP_INVERT Ta Yes
+.It PMC_CAP_READ Ta Yes
+.It PMC_CAP_PRECISE Ta \&No
+.It PMC_CAP_SYSTEM Ta Yes
+.It PMC_CAP_TAGGING Ta \&No
+.It PMC_CAP_THRESHOLD Ta Yes
+.It PMC_CAP_USER Ta Yes
+.It PMC_CAP_WRITE Ta Yes
+.El
+.Ss Event Qualifiers
+Event specifiers for these PMCs support the following common
+qualifiers:
+.Bl -tag -width indent
+.It Li rsp= Ns Ar value
+Configure the Off-core Response bits.
+.Bl -tag -width indent
+.It Li REQ_DMND_DATA_RD
+Counts the number of demand and DCU prefetch data reads of full and partial
+cachelines as well as demand data page table entry cacheline reads. Does not
+count L2 data read prefetches or instruction fetches.
+.It Li REQ_DMND_RFO
+Counts the number of demand and DCU prefetch reads for ownership (RFO)
+requests generated by a write to data cacheline. Does not count L2 RFO
+prefetches.
+.It Li REQ_DMND_IFETCH
+Counts the number of demand and DCU prefetch instruction cacheline reads.
+Does not count L2 code read prefetches.
+.It Li REQ_WB
+Counts the number of writeback (modified to exclusive) transactions.
+.It Li REQ_PF_DATA_RD
+Counts the number of data cacheline reads generated by L2 prefetchers.
+.It Li REQ_PF_RFO
+Counts the number of RFO requests generated by L2 prefetchers.
+.It Li REQ_PF_IFETCH
+Counts the number of code reads generated by L2 prefetchers.
+.It Li REQ_PF_LLC_DATA_RD
+L2 prefetcher to L3 for loads.
+.It Li REQ_PF_LLC_RFO
+RFO requests generated by L2 prefetcher
+.It Li REQ_PF_LLC_IFETCH
+L2 prefetcher to L3 for instruction fetches.
+.It Li REQ_BUS_LOCKS
+Bus lock and split lock requests.
+.It Li REQ_STRM_ST
+Streaming store requests.
+.It Li REQ_OTHER
+Any other request that crosses IDI, including I/O.
+.It Li RES_ANY
+Catch all value for any response types.
+.It Li RES_SUPPLIER_NO_SUPP
+No Supplier Information available.
+.It Li RES_SUPPLIER_LLC_HITM
+M-state initial lookup stat in L3.
+.It Li RES_SUPPLIER_LLC_HITE
+E-state.
+.It Li RES_SUPPLIER_LLC_HITS
+S-state.
+.It Li RES_SUPPLIER_LLC_HITF
+F-state.
+.It Li RES_SUPPLIER_LOCAL
+Local DRAM Controller.
+.It Li RES_SNOOP_SNP_NONE
+No details on snoop-related information.
+.It Li RES_SNOOP_SNP_NO_NEEDED
+No snoop was needed to satisfy the request.
+.It Li RES_SNOOP_SNP_MISS
+A snoop was needed and it missed all snooped caches:
+-For LLC Hit, ReslHitl was returned by all cores
+-For LLC Miss, Rspl was returned by all sockets and data was returned from
+DRAM.
+.It Li RES_SNOOP_HIT_NO_FWD
+A snoop was needed and it hits in at least one snooped cache. Hit denotes a
+cache-line was valid before snoop effect. This includes:
+-Snoop Hit w/ Invalidation (LLC Hit, RFO)
+-Snoop Hit, Left Shared (LLC Hit/Miss, IFetch/Data_RD)
+-Snoop Hit w/ Invalidation and No Forward (LLC Miss, RFO Hit S)
+In the LLC Miss case, data is returned from DRAM.
+.It Li RES_SNOOP_HIT_FWD
+A snoop was needed and data was forwarded from a remote socket.
+This includes:
+-Snoop Forward Clean, Left Shared (LLC Hit/Miss, IFetch/Data_RD/RFT).
+.It Li RES_SNOOP_HITM
+A snoop was needed and it HitM-ed in local or remote cache. HitM denotes a
+cache-line was in modified state before effect as a results of snoop. This
+includes:
+-Snoop HitM w/ WB (LLC miss, IFetch/Data_RD)
+-Snoop Forward Modified w/ Invalidation (LLC Hit/Miss, RFO)
+-Snoop MtoS (LLC Hit, IFetch/Data_RD).
+.It Li RES_NON_DRAM
+Target was non-DRAM system address. This includes MMIO transactions.
+.El
+.It Li cmask= Ns Ar value
+Configure the PMC to increment only if the number of configured
+events measured in a cycle is greater than or equal to
+.Ar value .
+.It Li edge
+Configure the PMC to count the number of de-asserted to asserted
+transitions of the conditions expressed by the other qualifiers.
+If specified, the counter will increment only once whenever a
+condition becomes true, irrespective of the number of clocks during
+which the condition remains true.
+.It Li inv
+Invert the sense of comparison when the
+.Dq Li cmask
+qualifier is present, making the counter increment when the number of
+events per cycle is less than the value specified by the
+.Dq Li cmask
+qualifier.
+.It Li os
+Configure the PMC to count events happening at processor privilege
+level 0.
+.It Li usr
+Configure the PMC to count events occurring at privilege levels 1, 2
+or 3.
+.El
+.Pp
+If neither of the
+.Dq Li os
+or
+.Dq Li usr
+qualifiers are specified, the default is to enable both.
+.Ss Event Specifiers (Programmable PMCs)
+Ivy Bridge programmable PMCs support the following events:
+.Bl -tag -width indent
+.It Li LD_BLOCKS.STORE_FORWARD
+.Pq Event 03H , Umask 02H
+loads blocked by overlapping with store buffer that cannot be forwarded .
+.It Li MISALIGN_MEM_REF.LOADS
+.Pq Event 05H , Umask 01H
+Speculative cache-line split load uops dispatched to L1D.
+.It Li MISALIGN_MEM_REF.STORES
+.Pq Event 05H , Umask 02H
+Speculative cache-line split Store- address uops dispatched to L1D.
+.It Li LD_BLOCKS_PARTIAL.ADDRESS_ALIAS
+.Pq Event 07H , Umask 01H
+False dependencies in MOB due to partial compare on address.
+.It Li DTLB_LOAD_MISSES.DEMAND_LD_MISS_CAUSES_A_WALK
+.Pq Event 08H , Umask 81H
+Misses in all TLB levels that cause a page walk of any page size from demand loads.
+.It Li DTLB_LOAD_MISSES.DEMAND_LD_WALK_COMPLETED
+.Pq Event 08H , Umask 82H
+Misses in all TLB levels that caused page walk completed of any size by demand loads.
+.It Li DTLB_LOAD_MISSES.DEMAND_LD_WALK_DURATION
+.Pq Event 08H , Umask 84H
+Cycle PMH is busy with a walk due to demand loads.
+.It Li UOPS_ISSUED.ANY
+.Pq Event 0EH , Umask 01H
+Increments each cycle the # of Uops issued by the RAT to RS.
+Set Cmask = 1, Inv = 1to count stalled cycles.
+Set Cmask = 1, Inv = 1, Any= 1to count stalled cycles of this core.
+.It Li UOPS_ISSUED.FLAGS_MERGE
+.Pq Event 0EH , Umask 10H
+Number of flags-merge uops allocated. Such uops adds delay.
+.It Li UOPS_ISSUED.SLOW_LEA
+.Pq Event 0EH , Umask 20H
+Number of slow LEA or similar uops allocated. Such uop has 3 sources (e.g. 2
+sources + immediate) regardless if as a result of LEA instruction or not.
+.It Li UOPS_ISSUED.SINGLE_MUL
+.Pq Event 0EH , Umask 40H
+Number of multiply packed/scalar single precision uops allocated.
+.It Li ARITH.FPU_DIV_ACTIVE
+.Pq Event 14H , Umask 01H
+Cycles that the divider is active, includes INT and FP. Set 'edge =1,
+cmask=1' to count the number of divides.
+.It Li L2_RQSTS.DEMAND_DATA_RD_HIT
+.Pq Event 24H , Umask 01H
+Demand Data Read requests that hit L2 cache.
+.It Li L2_RQSTS.ALL_DEMAND_DATA_RD
+.Pq Event 24H , Umask 03H
+Counts any demand and L1 HW prefetch data load requests to L2.
+.It Li L2_RQSTS.RFO_HITS
+.Pq Event 24H , Umask 04H
+Counts the number of store RFO requests that hit the L2 cache.
+.It Li L2_RQSTS.RFO_MISS
+.Pq Event 24H , Umask 08H
+Counts the number of store RFO requests that miss the L2 cache.
+.It Li L2_RQSTS.ALL_RFO
+.Pq Event 24H , Umask 0CH
+Counts all L2 store RFO requests.
+.It Li L2_RQSTS.CODE_RD_HIT
+.Pq Event 24H , Umask 10H
+Number of instruction fetches that hit the L2 cache.
+.It Li L2_RQSTS.CODE_RD_MISS
+.Pq Event 24H , Umask 20H
+Number of instruction fetches that missed the L2 cache.
+.It Li L2_RQSTS.ALL_CODE_RD
+.Pq Event 24H , Umask 30H
+Counts all L2 code requests.
+.It Li L2_RQSTS.PF_HIT
+.Pq Event 24H , Umask 40H
+Counts all L2 HW prefetcher requests that hit L2.
+.It Li L2_RQSTS.PF_MISS
+.Pq Event 24H , Umask 80H
+Counts all L2 HW prefetcher requests that missed L2.
+.It Li L2_RQSTS.ALL_PF
+.Pq Event 24H , Umask C0H
+Counts all L2 HW prefetcher requests.
+.It Li L2_STORE_LOCK_RQSTS.MISS
+.Pq Event 27H , Umask 01H
+RFOs that miss cache lines.
+.It Li L2_STORE_LOCK_RQSTS.HIT_M
+.Pq Event 27H , Umask 08H
+RFOs that hit cache lines in M state.
+.It Li L2_STORE_LOCK_RQSTS.ALL
+.Pq Event 27H , Umask 0FH
+RFOs that access cache lines in any state.
+.It Li L2_L1D_WB_RQSTS.MISS
+.Pq Event 28H , Umask 01H
+Not rejected writebacks that missed LLC.
+.It Li L2_L1D_WB_RQSTS.HIT_E
+.Pq Event 28H , Umask 04H
+Not rejected writebacks from L1D to L2 cache lines in E state.
+.It Li L2_L1D_WB_RQSTS.HIT_M
+.Pq Event 28H , Umask 08H
+Not rejected writebacks from L1D to L2 cache lines in M state.
+.It Li L2_L1D_WB_RQSTS.ALL
+.Pq Event 28H , Umask 0FH
+Not rejected writebacks from L1D to L2 cache lines in any state.
+.It Li LONGEST_LAT_CACHE.REFERENCE
+.Pq Event 2EH , Umask 4FH
+This event counts requests originating from the core that reference a cache
+line in the last level cache.
+.It Li LONGEST_LAT_CACHE.MISS
+.Pq Event 2EH , Umask 41H
+This event counts each cache miss condition for references to the last level
+cache.
+.It Li CPU_CLK_UNHALTED.THREAD_P
+.Pq Event 3CH , Umask 00H
+Counts the number of thread cycles while the thread is not in a halt state.
+The thread enters the halt state when it is running the HLT instruction. The
+core frequency may change from time to time due to power or thermal
+throttling.
+.It Li CPU_CLK_THREAD_UNHALTED.REF_XCLK
+.Pq Event 3CH , Umask 01H
+Increments at the frequency of XCLK (100 MHz) when not halted.
+.It Li L1D_PEND_MISS.PENDING
+.Pq Event 48H , Umask 01H
+Increments the number of outstanding L1D misses every cycle. Set Cmaks = 1
+and Edge =1 to count occurrences.
+Counter 2 only.
+Set Cmask = 1 to count cycles.
+.It Li DTLB_STORE_MISSES.MISS_CAUSES_A_WALK
+.Pq Event 49H , Umask 01H
+Miss in all TLB levels causes an page walk of any page size (4K/2M/4M/1G).
+.It Li DTLB_STORE_MISSES.WALK_COMPLETED
+.Pq Event 49H , Umask 02H
+Miss in all TLB levels causes a page walk that completes of any page size
+(4K/2M/4M/1G).
+.It Li DTLB_STORE_MISSES.WALK_DURATION
+.Pq Event 49H , Umask 04H
+Cycles PMH is busy with this walk.
+.It Li DTLB_STORE_MISSES.STLB_HIT
+.Pq Event 49H , Umask 10H
+Store operations that miss the first TLB level but hit the second and do not
+cause page walks.
+.It Li LOAD_HIT_PRE.SW_PF
+.Pq Event 4CH , Umask 01H
+Non-SW-prefetch load dispatches that hit fill buffer allocated for S/W prefetch.
+.It Li LOAD_HIT_PRE.HW_PF
+.Pq Event 4CH , Umask 02H
+Non-SW-prefetch load dispatches that hit fill buffer allocated for H/W prefetch.
+.It Li L1D.REPLACEMENT
+.Pq Event 51H , Umask 01H
+Counts the number of lines brought into the L1 data cache.
+.It Li MOVE_ELIMINATION.INT_NOT_ELIMINATED
+.Pq Event 58H , Umask 01H
+Number of integer Move Elimination candidate uops that were not eliminated.
+.It Li MOVE_ELIMINATION.SIMD_NOT_ELIMINATED
+.Pq Event 58H , Umask 02H
+Number of SIMD Move Elimination candidate uops that were not eliminated.
+.It Li MOVE_ELIMINATION.INT_ELIMINATED
+.Pq Event 58H , Umask 04H
+Number of integer Move Elimination candidate uops that were eliminated.
+.It Li MOVE_ELIMINATION.SIMD_ELIMINATED
+.Pq Event 58H , Umask 08H
+Number of SIMD Move Elimination candidate uops that were eliminated.
+.It Li CPL_CYCLES.RING0
+.Pq Event 5CH , Umask 01H
+Unhalted core cycles when the thread is in ring 0.
+Use Edge to count transition.
+.It Li CPL_CYCLES.RING123
+.Pq Event 5CH , Umask 02H
+Unhalted core cycles when the thread is not in ring 0.
+.It Li RS_EVENTS.EMPTY_CYCLES
+.Pq Event 5EH , Umask 01H
+Cycles the RS is empty for the thread.
+.It Li TLB_ACCESS.LOAD_STLB_HIT
+.Pq Event 5FH , Umask 01H
+Counts load operations that missed 1st level DTLB but hit the 2nd level.
+.It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD
+.Pq Event 60H , Umask 01H
+Offcore outstanding Demand Data Read transactions in SQ to uncore. Set
+Cmask=1 to count cycles.
+.It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD
+.Pq Event 60H , Umask 02H
+Offcore outstanding Demand Code Read transactions in SQ to uncore. Set
+Cmask=1 to count cycles.
+.It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO
+.Pq Event 60H , Umask 04H
+Offcore outstanding RFO store transactions in SQ to uncore. Set Cmask=1 to
+count cycles.
+.It Li OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD
+.Pq Event 60H , Umask 08H
+Offcore outstanding cacheable data read transactions in SQ to uncore. Set
+Cmask=1 to count cycles.
+.It Li LOCK_CYCLES.SPLIT_LOCK_UC_LOCK_DURATION
+.Pq Event 63H , Umask 01H
+Cycles in which the L1D and L2 are locked, due to a UC lock or split lock.
+.It Li LOCK_CYCLES.CACHE_LOCK_DURATION
+.Pq Event 63H , Umask 02H
+Cycles in which the L1D is locked.
+.It Li IDQ.EMPTY
+.Pq Event 79H , Umask 02H
+Counts cycles the IDQ is empty.
+.It Li IDQ.MITE_UOPS
+.Pq Event 79H , Umask 04H
+Increment each cycle # of uops delivered to IDQ from MITE path.
+Can combine Umask 04H and 20H.
+Set Cmask = 1 to count cycles.
+.It Li IDQ.DSB_UOPS
+.Pq Event 79H , Umask 08H
+Increment each cycle. # of uops delivered to IDQ from DSB path.
+Can combine Umask 08H and 10H
+Set Cmask = 1 to count cycles.
+.It Li IDQ.MS_DSB_UOPS
+.Pq Event 79H , Umask 10H
+Increment each cycle # of uops delivered to IDQ when MS_busy by DSB. Set
+Cmask = 1 to count cycles. Add Edge=1 to count # of delivery.
+Can combine Umask 04H, 08H.
+.It Li IDQ.MS_MITE_UOPS
+.Pq Event 79H , Umask 20H
+Increment each cycle # of uops delivered to IDQ when MS_busy by MITE. Set
+Cmask = 1 to count cycles.
+Can combine Umask 04H, 08H.
+.It Li IDQ.MS_UOPS
+.Pq Event 79H , Umask 30H
+Increment each cycle # of uops delivered to IDQ from MS by either DSB or
+MITE. Set Cmask = 1 to count cycles.
+Can combine Umask 04H, 08H.
+.It Li IDQ.ALL_DSB_CYCLES_ANY_UOPS
+.Pq Event 79H , Umask 18H
+Counts cycles DSB is delivered at least one uops. Set Cmask = 1.
+.It Li IDQ.ALL_DSB_CYCLES_4_UOPS
+.Pq Event 79H , Umask 18H
+Counts cycles DSB is delivered four uops. Set Cmask = 4.
+.It Li IDQ.ALL_MITE_CYCLES_ANY_UOPS
+.Pq Event 79H , Umask 24H
+Counts cycles MITE is delivered at least one uops. Set Cmask = 1.
+.It Li IDQ.ALL_MITE_CYCLES_4_UOPS
+.Pq Event 79H , Umask 24H
+Counts cycles MITE is delivered four uops. Set Cmask = 4.
+.It Li IDQ.MITE_ALL_UOPS
+.Pq Event 79H , Umask 3CH
+# of uops delivered to IDQ from any path.
+.It Li ICACHE.MISSES
+.Pq Event 80H , Umask 02H
+Number of Instruction Cache, Streaming Buffer and Victim Cache Misses.
+Includes UC accesses.
+.It Li ITLB_MISSES.MISS_CAUSES_A_WALK
+.Pq Event 85H , Umask 01H
+Misses in all ITLB levels that cause page walks.
+.It Li ITLB_MISSES.WALK_COMPLETED
+.Pq Event 85H , Umask 02H
+Misses in all ITLB levels that cause completed page walks.
+.It Li ITLB_MISSES.WALK_DURATION
+.Pq Event 85H , Umask 04H
+Cycle PMH is busy with a walk.
+.It Li ITLB_MISSES.STLB_HIT
+.Pq Event 85H , Umask 10H
+Number of cache load STLB hits. No page walk.
+.It Li ILD_STALL.LCP
+.Pq Event 87H , Umask 01H
+Stalls caused by changing prefix length of the instruction.
+.It Li ILD_STALL.IQ_FULL
+.Pq Event 87H , Umask 04H
+Stall cycles due to IQ is full.
+.It Li BR_INST_EXEC.COND
+.Pq Event 88H , Umask 01H
+Qualify conditional near branch instructions executed, but not necessarily
+retired.
+Must combine with umask 40H, 80H.
+.It Li BR_INST_EXEC.DIRECT_JMP
+.Pq Event 88H , Umask 02H
+Qualify all unconditional near branch instructions excluding calls and
+indirect branches.
+Must combine with umask 80H.
+.It Li BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET
+.Pq Event 88H , Umask 04H
+Qualify executed indirect near branch instructions that are not calls nor
+returns.
+Must combine with umask 80H.
+.It Li BR_INST_EXEC.RETURN_NEAR
+.Pq Event 88H , Umask 08H
+Qualify indirect near branches that have a return mnemonic.
+Must combine with umask 80H.
+.It Li BR_INST_EXEC.DIRECT_NEAR_CALL
+.Pq Event 88H , Umask 10H
+Qualify unconditional near call branch instructions, excluding non call
+branch, executed.
+Must combine with umask 80H.
+.It Li BR_INST_EXEC.INDIRECT_NEAR_CALL
+.Pq Event 88H , Umask 20H
+Qualify indirect near calls, including both register and memory indirect,
+executed.
+Must combine with umask 80H.
+.It Li BR_INST_EXEC.NONTAKEN
+.Pq Event 88H , Umask 40H
+Qualify non-taken near branches executed.
+Applicable to umask 01H only.
+.It Li BR_INST_EXEC.TAKEN
+.Pq Event 88H , Umask 80H
+Qualify taken near branches executed. Must combine with 01H,02H, 04H, 08H,
+10H, 20H.
+.It Li BR_INST_EXEC.ALL_BRANCHES
+.Pq Event 88H , Umask FFH
+Counts all near executed branches (not necessarily retired).
+.It Li BR_MISP_EXEC.COND
+.Pq Event 89H , Umask 01H
+Qualify conditional near branch instructions mispredicted.
+Must combine with umask 40H, 80H.
+.It Li BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET
+.Pq Event 89H , Umask 04H
+Qualify mispredicted indirect near branch instructions that are not calls
+nor returns.
+Must combine with umask 80H.
+.It Li BR_MISP_EXEC.RETURN_NEAR
+.Pq Event 89H , Umask 08H
+Qualify mispredicted indirect near branches that have a return mnemonic.
+Must combine with umask 80H.
+.It Li BR_MISP_EXEC.DIRECT_NEAR_CALL
+.Pq Event 89H , Umask 10H
+Qualify mispredicted unconditional near call branch instructions, excluding
+non call branch, executed.
+Must combine with umask 80H.
+.It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL
+.Pq Event 89H , Umask 20H
+Qualify mispredicted indirect near calls, including both register and memory
+indirect, executed.
+Must combine with umask 80H.
+.It Li BR_MISP_EXEC.NONTAKEN
+.Pq Event 89H , Umask 40H
+Qualify mispredicted non-taken near branches executed.
+Applicable to umask 01H only.
+.It Li BR_MISP_EXEC.TAKEN
+.Pq Event 89H , Umask 80H
+Qualify mispredicted taken near branches executed. Must combine with
+01H,02H, 04H, 08H, 10H, 20H.
+.It Li BR_MISP_EXEC.ALL_BRANCHES
+.Pq Event 89H , Umask FFH
+Counts all near executed branches (not necessarily retired).
+.It Li IDQ_UOPS_NOT_DELIVERED.CORE
+.Pq Event 9CH , Umask 01H
+Count number of non-delivered uops to RAT per thread.
+Use Cmask to qualify uop b/w.
+.It Li UOPS_DISPATCHED_PORT.PORT_0
+.Pq Event A1H , Umask 01H
+Cycles which a Uop is dispatched on port 0.
+.It Li UOPS_DISPATCHED_PORT.PORT_1
+.Pq Event A1H , Umask 02H
+Cycles which a Uop is dispatched on port 1.
+.It Li UOPS_DISPATCHED_PORT.PORT_2_LD
+.Pq Event A1H , Umask 04H
+Cycles which a load uop is dispatched on port 2.
+.It Li UOPS_DISPATCHED_PORT.PORT_2_STA
+.Pq Event A1H , Umask 08H
+Cycles which a store address uop is dispatched on port 2.
+.It Li UOPS_DISPATCHED_PORT.PORT_2
+.Pq Event A1H , Umask 0CH
+Cycles which a Uop is dispatched on port 2.
+.It Li UOPS_DISPATCHED_PORT.PORT_3_LD
+.Pq Event A1H , Umask 10H
+Cycles which a load uop is dispatched on port 3.
+.It Li UOPS_DISPATCHED_PORT.PORT_3_STA
+.Pq Event A1H , Umask 20H
+Cycles which a store address uop is dispatched on port 3.
+.It Li UOPS_DISPATCHED_PORT.PORT_3
+.Pq Event A1H , Umask 30H
+Cycles which a Uop is dispatched on port 3.
+.It Li UOPS_DISPATCHED_PORT.PORT_4
+.Pq Event A1H , Umask 40H
+Cycles which a Uop is dispatched on port 4.
+.It Li UOPS_DISPATCHED_PORT.PORT_5
+.Pq Event A1H , Umask 80H
+Cycles which a Uop is dispatched on port 5.
+.It Li RESOURCE_STALLS.ANY
+.Pq Event A2H , Umask 01H
+Cycles Allocation is stalled due to Resource Related reason.
+.It Li RESOURCE_STALLS.RS
+.Pq Event A2H , Umask 04H
+Cycles stalled due to no eligible RS entry available.
+.It Li RESOURCE_STALLS.SB
+.Pq Event A2H , Umask 08H
+Cycles stalled due to no store buffers available. (not including draining
+form sync).
+.It Li RESOURCE_STALLS.ROB
+.Pq Event A2H , Umask 10H
+Cycles stalled due to re-order buffer full.
+.It Li DSB2MITE_SWITCHES.COUNT
+.Pq Event ABH , Umask 01H
+Number of DSB to MITE switches.
+.It Li DSB2MITE_SWITCHES.PENALTY_CYCLES
+.Pq Event ABH , Umask 02H
+Cycles DSB to MITE switches caused delay.
+.It Li DSB_FILL.EXCEED_DSB_LINES
+.Pq Event ACH , Umask 08H
+DSB Fill encountered > 3 DSB lines.
+.It Li ITLB.ITLB_FLUSH
+.Pq Event AEH , Umask 01H
+Counts the number of ITLB flushes, includes 4k/2M/4M pages.
+.It Li OFFCORE_REQUESTS.DEMAND_DATA_RD
+.Pq Event B0H , Umask 01H
+Demand data read requests sent to uncore.
+.It Li OFFCORE_REQUESTS.DEMAND_CODE_RD
+.Pq Event B0H , Umask 02H
+Demand code read requests sent to uncore.
+.It Li OFFCORE_REQUESTS.DEMAND_RFO
+.Pq Event B0H , Umask 04H
+Demand RFO read requests sent to uncore, including regular RFOs, locks,
+ItoM.
+.It Li OFFCORE_REQUESTS.ALL_DATA_RD
+.Pq Event B0H , Umask 08H
+Data read requests sent to uncore (demand and prefetch).
+.It Li UOPS_EXECUTED.THREAD
+.Pq Event B1H , Umask 01H
+Counts total number of uops to be executed per-thread each cycle. Set Cmask
+= 1, INV =1 to count stall cycles.
+.It Li UOPS_EXECUTED.CORE
+.Pq Event B1H , Umask 02H
+Counts total number of uops to be executed per-core each cycle.
+Do not need to set ANY.
+.It Li OFF_CORE_RESPONSE_0
+.Pq Event B7H , Umask 01H
+Off-core Response Performance Monitoring.
+PMC0 only.
+Requires programming MSR 01A6H.
+.It Li OFF_CORE_RESPONSE_1
+.Pq Event BBH , Umask 01H
+Off-core Response Performance Monitoring.
+PMC3 only.
+Requires programming MSR 01A7H.
+.It Li TLB_FLUSH.DTLB_THREAD
+.Pq Event BDH , Umask 01H
+DTLB flush attempts of the thread- specific entries.
+.It Li TLB_FLUSH.STLB_ANY
+.Pq Event BDH , Umask 20H
+Count number of STLB flush attempts.
+.It Li INST_RETIRED.ANY_P
+.Pq Event C0H , Umask 00H
+Number of instructions at retirement.
+.It Li INST_RETIRED.ALL
+.Pq Event C0H , Umask 01H
+Precise instruction retired event with HW to reduce effect of PEBS shadow in
+IP distribution.
+PMC1 only.
+Must quiesce other PMCs.
+.It Li OTHER_ASSISTS.AVX_STORE
+.Pq Event C1H , Umask 08H
+Number of assists associated with 256-bit AVX store operations.
+.It Li OTHER_ASSISTS.AVX_TO_SSE
+.Pq Event C1H , Umask 10H
+Number of transitions from AVX- 256 to legacy SSE when penalty applicable.
+.It Li OTHER_ASSISTS.SSE_TO_AVX
+.Pq Event C1H , Umask 20H
+Number of transitions from SSE to AVX-256 when penalty applicable.
+.It Li UOPS_RETIRED.ALL
+.Pq Event C2H , Umask 01H
+Counts the number of micro-ops retired, Use cmask=1 and invert to count
+active cycles or stalled cycles.
+Supports PEBS, use Any=1 for core granular.
+.It Li UOPS_RETIRED.RETIRE_SLOTS
+.Pq Event C2H , Umask 02H
+Counts the number of retirement slots used each cycle.
+.It Li MACHINE_CLEARS.MEMORY_ORDERING
+.Pq Event C3H , Umask 02H
+Counts the number of machine clears due to memory order conflicts.
+.It Li MACHINE_CLEARS.SMC
+.Pq Event C3H , Umask 04H
+Number of self-modifying-code machine clears detected.
+.It Li MACHINE_CLEARS.MASKMOV
+.Pq Event C3H , Umask 20H
+Counts the number of executed AVX masked load operations that refer to an
+illegal address range with the mask bits set to 0.
+.It Li BR_INST_RETIRED.ALL_BRANCHES
+.Pq Event C4H , Umask 00H
+Branch instructions at retirement.
+.It Li BR_INST_RETIRED.CONDITIONAL
+.Pq Event C4H , Umask 01H
+Counts the number of conditional branch instructions retired.
+Supports PEBS.
+.It Li BR_INST_RETIRED.NEAR_CALL
+.Pq Event C4H , Umask 02H
+Direct and indirect near call instructions retired.
+.It Li BR_INST_RETIRED.ALL_BRANCHES
+.Pq Event C4H , Umask 04H
+Counts the number of branch instructions retired.
+.It Li BR_INST_RETIRED.NEAR_RETURN
+.Pq Event C4H , Umask 08H
+Counts the number of near return instructions retired.
+.It Li BR_INST_RETIRED.NOT_TAKEN
+.Pq Event C4H , Umask 10H
+Counts the number of not taken branch instructions retired.
+.It Li BR_INST_RETIRED.NEAR_TAKEN
+.Pq Event C4H , Umask 20H
+Number of near taken branches retired.
+.It Li BR_INST_RETIRED.FAR_BRANCH
+.Pq Event C4H , Umask 40H
+Number of far branches retired.
+.It Li BR_MISP_RETIRED.ALL_BRANCHES
+.Pq Event C5H , Umask 00H
+Mispredicted branch instructions at retirement.
+.It Li BR_MISP_RETIRED.CONDITIONAL
+.Pq Event C5H , Umask 01H
+Mispredicted conditional branch instructions retired.
+Supports PEBS.
+.It Li BR_MISP_RETIRED.NEAR_CALL
+.Pq Event C5H , Umask 02H
+Direct and indirect mispredicted near call instructions retired.
+.It Li BR_MISP_RETIRED.ALL_BRANCHES
+.Pq Event C5H , Umask 04H
+Mispredicted macro branch instructions retired.
+.It Li BR_MISP_RETIRED.NOT_TAKEN
+.Pq Event C5H , Umask 10H
+Mispredicted not taken branch instructions retired.
+.It Li BR_MISP_RETIRED.TAKEN
+.Pq Event C5H , Umask 20H
+Mispredicted taken branch instructions retired.
+.It Li FP_ASSIST.X87_OUTPUT
+.Pq Event CAH , Umask 02H
+Number of X87 FP assists due to Output values.
+.It Li FP_ASSIST.X87_INPUT
+.Pq Event CAH , Umask 04H
+Number of X87 FP assists due to input values.
+.It Li FP_ASSIST.SIMD_OUTPUT
+.Pq Event CAH , Umask 08H
+Number of SIMD FP assists due to Output values.
+.It Li FP_ASSIST.SIMD_INPUT
+.Pq Event CAH , Umask 10H
+Number of SIMD FP assists due to input values.
+.It Li FP_ASSIST.ANY
+.Pq Event CAH , Umask 1EH
+Cycles with any input/output SSE* or FP assists.
+.It Li ROB_MISC_EVENTS.LBR_INSERTS
+.Pq Event CCH , Umask 20H
+Count cases of saving new LBR records by hardware.
+.It Li MEM_TRANS_RETIRED.LOAD_LATENCY
+.Pq Event CDH , Umask 01H
+Sample loads with specified latency threshold.
+PMC3 only.
+Specify threshold in MSR 0x3F6.
+.It Li MEM_TRANS_RETIRED.PRECISE_STORE
+.Pq Event CDH , Umask 02H
+Sample stores and collect precise store operation via PEBS record.
+PMC3 only.
+.It Li MEM_UOP_RETIRED.LOADS
+.Pq Event D0H , Umask 01H
+Qualify retired memory uops that are loads. Combine with umask 10H, 20H,
+40H, 80H.
+Supports PEBS.
+.It Li MEM_UOP_RETIRED.STORES
+.Pq Event D0H , Umask 02H
+Qualify retired memory uops that are stores. Combine with umask 10H, 20H,
+40H, 80H.
+.It Li MEM_UOP_RETIRED.STLB_MISS
+.Pq Event D0H , Umask 10H
+Qualify retired memory uops with STLB miss. Must combine with umask 01H,
+02H, to produce counts.
+.It Li MEM_UOP_RETIRED.LOCK
+.Pq Event D0H , Umask 20H
+Qualify retired memory uops with lock. Must combine with umask 01H, 02H, to
+produce counts.
+.It Li MEM_UOP_RETIRED.SPLIT
+.Pq Event D0H , Umask 40H
+Qualify retired memory uops with line split. Must combine with umask 01H,
+02H, to produce counts.
+.It Li MEM_UOP_RETIRED.ALL
+.Pq Event D0H , Umask 80H
+Qualify any retired memory uops. Must combine with umask 01H, 02H, to
+produce counts.
+.It Li MEM_LOAD_UOPS_RETIRED.L1_HIT
+.Pq Event D1H , Umask 01H
+Retired load uops with L1 cache hits as data sources.
+Supports PEBS.
+.It Li MEM_LOAD_UOPS_RETIRED.L2_HIT
+.Pq Event D1H , Umask 02H
+Retired load uops with L2 cache hits as data sources.
+.It Li MEM_LOAD_UOPS_RETIRED.LLC_HIT
+.Pq Event D1H , Umask 04H
+Retired load uops with LLC cache hits as data sources.
+.It Li MEM_LOAD_UOPS_RETIRED.HIT_LFB
+.Pq Event D1H , Umask 40H
+Retired load uops which data sources were load uops missed L1 but hit FB due
+to preceding miss to the same cache line with data not ready.
+.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS
+.Pq Event D2H , Umask 01H
+Retired load uops which data sources were LLC hit and cross-core snoop
+missed in on-pkg core cache.
+Supports PEBS.
+.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT
+.Pq Event D2H , Umask 02H
+Retired load uops which data sources were LLC and cross-core snoop hits in
+on-pkg core cache.
+Supports PEBS.
+.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM
+.Pq Event D2H , Umask 04H
+Retired load uops which data sources were HitM responses from shared LLC.
+.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE
+.Pq Event D2H , Umask 08H
+Retired load uops which data sources were hits in LLC without snoops
+required.
+.It Li MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM
+.Pq Event D3H , Umask 01H
+Retired load uops which data sources missed LLC but serviced from local
+dram.
+Supports PEBS.
+.It Li L2_TRANS.DEMAND_DATA_RD
+.Pq Event F0H , Umask 01H
+Demand Data Read requests that access L2 cache.
+.It Li L2_TRANS.RFO
+.Pq Event F0H , Umask 02H
+RFO requests that access L2 cache.
+.It Li L2_TRANS.CODE_RD
+.Pq Event F0H , Umask 04H
+L2 cache accesses when fetching instructions.
+.It Li L2_TRANS.ALL_PF
+.Pq Event F0H , Umask 08H
+Any MLC or LLC HW prefetch accessing L2, including rejects.
+.It Li L2_TRANS.L1D_WB
+.Pq Event F0H , Umask 10H
+L1D writebacks that access L2 cache.
+.It Li L2_TRANS.L2_FILL
+.Pq Event F0H , Umask 20H
+L2 fill requests that access L2 cache.
+.It Li L2_TRANS.L2_WB
+.Pq Event F0H , Umask 40H
+L2 writebacks that access L2 cache.
+.It Li L2_TRANS.ALL_REQUESTS
+.Pq Event F0H , Umask 80H
+Transactions accessing L2 pipe.
+.It Li L2_LINES_IN.I
+.Pq Event F1H , Umask 01H
+L2 cache lines in I state filling L2.
+Counting does not cover rejects.
+.It Li L2_LINES_IN.S
+.Pq Event F1H , Umask 02H
+L2 cache lines in S state filling L2.
+Counting does not cover rejects.
+.It Li L2_LINES_IN.E
+.Pq Event F1H , Umask 04H
+L2 cache lines in E state filling L2.
+Counting does not cover rejects.
+.It Li L2_LINES_IN.ALL
+.Pq Event F1H , Umask 07H
+L2 cache lines filling L2.
+Counting does not cover rejects.
+.It Li L2_LINES_OUT.DEMAND_CLEAN
+.Pq Event F2H , Umask 01H
+Clean L2 cache lines evicted by demand.
+.It Li L2_LINES_OUT.DEMAND_DIRTY
+.Pq Event F2H , Umask 02H
+Dirty L2 cache lines evicted by demand.
+.It Li L2_LINES_OUT.PF_CLEAN
+.Pq Event F2H , Umask 04H
+Clean L2 cache lines evicted by the MLC prefetcher.
+.It Li L2_LINES_OUT.PF_DIRTY
+.Pq Event F2H , Umask 08H
+Dirty L2 cache lines evicted by the MLC prefetcher.
+.El
+.Sh SEE ALSO
+.Xr pmc 3 ,
+.Xr pmc.atom 3 ,
+.Xr pmc.core 3 ,
+.Xr pmc.iaf 3 ,
+.Xr pmc.ucf 3 ,
+.Xr pmc.k7 3 ,
+.Xr pmc.k8 3 ,
+.Xr pmc.p4 3 ,
+.Xr pmc.p5 3 ,
+.Xr pmc.p6 3 ,
+.Xr pmc.corei7 3 ,
+.Xr pmc.corei7uc 3 ,
+.Xr pmc.sandybridge 3 ,
+.Xr pmc.sandybridgeuc 3 ,
+.Xr pmc.sandybridgexeon 3 ,
+.Xr pmc.westmere 3 ,
+.Xr pmc.westmereuc 3 ,
+.Xr pmc.soft 3 ,
+.Xr pmc.tsc 3 ,
+.Xr pmc_cpuinfo 3 ,
+.Xr pmclog 3 ,
+.Xr hwpmc 4
+.Sh HISTORY
+The
+.Nm pmc
+library first appeared in
+.Fx 6.0 .
+.Sh AUTHORS
+The
+.Lb libpmc
+library was written by
+.An "Joseph Koshy"
+.Aq jkoshy@FreeBSD.org .
+The support for the Ivy Bridge
+microarchitecture was written by
+.An "Fabien Thomas"
+.Aq fabient@FreeBSD.org .
diff --git a/lib/libpmc/pmc.sandybridge.3 b/lib/libpmc/pmc.sandybridge.3
index e0c7eb9..62f8f28 100644
--- a/lib/libpmc/pmc.sandybridge.3
+++ b/lib/libpmc/pmc.sandybridge.3
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 12, 2012
+.Dd October 19, 2012
.Dt PMC.SANDYBRIDGE 3
.Os
.Sh NAME
@@ -93,55 +93,80 @@ qualifiers:
.It Li rsp= Ns Ar value
Configure the Off-core Response bits.
.Bl -tag -width indent
-.It Li DMND_DATA_RD
-Counts the number of demand and DCU prefetch data reads of full
-and partial cachelines as well as demand data page table entry
-cacheline reads.
-Does not count L2 data read prefetches or instruction fetches.
-.It Li DMND_RFO
-Counts the number of demand and DCU prefetch reads for ownership
-(RFO) requests generated by a write to data cacheline.
-Does not count L2 RFO.
-.It Li DMND_IFETCH
-Counts the number of demand and DCU prefetch instruction cacheline
-reads.
+.It Li REQ_DMND_DATA_RD
+Counts the number of demand and DCU prefetch data reads of full and partial
+cachelines as well as demand data page table entry cacheline reads. Does not
+count L2 data read prefetches or instruction fetches.
+.It Li REQ_DMND_RFO
+Counts the number of demand and DCU prefetch reads for ownership (RFO)
+requests generated by a write to data cacheline. Does not count L2 RFO
+prefetches.
+.It Li REQ_DMND_IFETCH
+Counts the number of demand and DCU prefetch instruction cacheline reads.
Does not count L2 code read prefetches.
-.It Li WB
+.It Li REQ_WB
Counts the number of writeback (modified to exclusive) transactions.
-.It Li PF_DATA_RD
+.It Li REQ_PF_DATA_RD
Counts the number of data cacheline reads generated by L2 prefetchers.
-.It Li PF_RFO
+.It Li REQ_PF_RFO
Counts the number of RFO requests generated by L2 prefetchers.
-.It Li PF_IFETCH
+.It Li REQ_PF_IFETCH
Counts the number of code reads generated by L2 prefetchers.
-.It Li OTHER
-Counts one of the following transaction types, including L3 invalidate,
-I/O, full or partial writes, WC or non-temporal stores, CLFLUSH, Fences,
-lock, unlock, split lock.
-.It Li UNCORE_HIT
-L3 Hit: local or remote home requests that hit L3 cache in the uncore
-with no coherency actions required (snooping).
-.It Li OTHER_CORE_HIT_SNP
-L3 Hit: local or remote home requests that hit L3 cache in the uncore
-and was serviced by another core with a cross core snoop where no modified
-copies were found (clean).
-.It Li OTHER_CORE_HITM
-L3 Hit: local or remote home requests that hit L3 cache in the uncore
-and was serviced by another core with a cross core snoop where modified
-copies were found (HITM).
-.It Li REMOTE_CACHE_FWD
-L3 Miss: local homed requests that missed the L3 cache and was serviced
-by forwarded data following a cross package snoop where no modified
-copies found.
-(Remote home requests are not counted)
-.It Li REMOTE_DRAM
-L3 Miss: remote home requests that missed the L3 cache and were serviced
-by remote DRAM.
-.It Li LOCAL_DRAM
-L3 Miss: local home requests that missed the L3 cache and were serviced
-by local DRAM.
-.It Li NON_DRAM
-Non-DRAM requests that were serviced by IOH.
+.It Li REQ_PF_LLC_DATA_RD
+L2 prefetcher to L3 for loads.
+.It Li REQ_PF_LLC_RFO
+RFO requests generated by L2 prefetcher
+.It Li REQ_PF_LLC_IFETCH
+L2 prefetcher to L3 for instruction fetches.
+.It Li REQ_BUS_LOCKS
+Bus lock and split lock requests.
+.It Li REQ_STRM_ST
+Streaming store requests.
+.It Li REQ_OTHER
+Any other request that crosses IDI, including I/O.
+.It Li RES_ANY
+Catch all value for any response types.
+.It Li RES_SUPPLIER_NO_SUPP
+No Supplier Information available.
+.It Li RES_SUPPLIER_LLC_HITM
+M-state initial lookup stat in L3.
+.It Li RES_SUPPLIER_LLC_HITE
+E-state.
+.It Li RES_SUPPLIER_LLC_HITS
+S-state.
+.It Li RES_SUPPLIER_LLC_HITF
+F-state.
+.It Li RES_SUPPLIER_LOCAL
+Local DRAM Controller.
+.It Li RES_SNOOP_SNP_NONE
+No details on snoop-related information.
+.It Li RES_SNOOP_SNP_NO_NEEDED
+No snoop was needed to satisfy the request.
+.It Li RES_SNOOP_SNP_MISS
+A snoop was needed and it missed all snooped caches:
+-For LLC Hit, ReslHitl was returned by all cores
+-For LLC Miss, Rspl was returned by all sockets and data was returned from
+DRAM.
+.It Li RES_SNOOP_HIT_NO_FWD
+A snoop was needed and it hits in at least one snooped cache. Hit denotes a
+cache-line was valid before snoop effect. This includes:
+-Snoop Hit w/ Invalidation (LLC Hit, RFO)
+-Snoop Hit, Left Shared (LLC Hit/Miss, IFetch/Data_RD)
+-Snoop Hit w/ Invalidation and No Forward (LLC Miss, RFO Hit S)
+In the LLC Miss case, data is returned from DRAM.
+.It Li RES_SNOOP_HIT_FWD
+A snoop was needed and data was forwarded from a remote socket.
+This includes:
+-Snoop Forward Clean, Left Shared (LLC Hit/Miss, IFetch/Data_RD/RFT).
+.It Li RES_SNOOP_HITM
+A snoop was needed and it HitM-ed in local or remote cache. HitM denotes a
+cache-line was in modified state before effect as a results of snoop. This
+includes:
+-Snoop HitM w/ WB (LLC miss, IFetch/Data_RD)
+-Snoop Forward Modified w/ Invalidation (LLC Hit/Miss, RFO)
+-Snoop MtoS (LLC Hit, IFetch/Data_RD).
+.It Li RES_NON_DRAM
+Target was non-DRAM system address. This includes MMIO transactions.
.El
.It Li cmask= Ns Ar value
Configure the PMC to increment only if the number of configured
@@ -907,6 +932,7 @@ Split locks in SQ.
.Xr pmc.p5 3 ,
.Xr pmc.p6 3 ,
.Xr pmc.sandybridgeuc 3 ,
+.Xr pmc.sandybridgexeon 3 ,
.Xr pmc.soft 3 ,
.Xr pmc.tsc 3 ,
.Xr pmc.ucf 3 ,
diff --git a/lib/libpmc/pmc.sandybridgeuc.3 b/lib/libpmc/pmc.sandybridgeuc.3
index 2078482..f952533 100644
--- a/lib/libpmc/pmc.sandybridgeuc.3
+++ b/lib/libpmc/pmc.sandybridgeuc.3
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 12, 2012
+.Dd October 19, 2012
.Dt PMC.SANDYBRIDGEUC 3
.Os
.Sh NAME
@@ -208,6 +208,7 @@ Counts the number of core-outgoing entries in the coherent tracker queue.
.Xr pmc.p5 3 ,
.Xr pmc.p6 3 ,
.Xr pmc.sandybridge 3 ,
+.Xr pmc.sandybridgexeon 3 ,
.Xr pmc.soft 3 ,
.Xr pmc.tsc 3 ,
.Xr pmc.ucf 3 ,
diff --git a/lib/libpmc/pmc.sandybridgexeon.3 b/lib/libpmc/pmc.sandybridgexeon.3
new file mode 100644
index 0000000..c62a82b
--- /dev/null
+++ b/lib/libpmc/pmc.sandybridgexeon.3
@@ -0,0 +1,1023 @@
+.\" Copyright (c) 2012 Hiren Panchasara <hiren.panchasara@gmail.com>
+.\" 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$
+.\"
+.Dd October 18, 2012
+.Dt PMC.SANDYBRIDGEXEON 3
+.Os
+.Sh NAME
+.Nm pmc.sandybridgexeon
+.Nd measurement events for
+.Tn Intel
+.Tn Sandy Bridge Xeon
+family CPUs
+.Sh LIBRARY
+.Lb libpmc
+.Sh SYNOPSIS
+.In pmc.h
+.Sh DESCRIPTION
+.Tn Intel
+.Tn "Sandy Bridge Xeon"
+CPUs contain PMCs conforming to version 2 of the
+.Tn Intel
+performance measurement architecture.
+These CPUs may contain up to two classes of PMCs:
+.Bl -tag -width "Li PMC_CLASS_IAP"
+.It Li PMC_CLASS_IAF
+Fixed-function counters that count only one hardware event per counter.
+.It Li PMC_CLASS_IAP
+Programmable counters that may be configured to count one of a defined
+set of hardware events.
+.El
+.Pp
+The number of PMCs available in each class and their widths need to be
+determined at run time by calling
+.Xr pmc_cpuinfo 3 .
+.Pp
+Intel Sandy Bridge Xeon PMCs are documented in
+.Rs
+.%B "Intel(R) 64 and IA-32 Architectures Software Developer's Manual"
+.%T "Volume 3B: System Programming Guide, Part 2"
+.%N "Order Number: 253669-043US"
+.%D August 2012
+.%Q "Intel Corporation"
+.Re
+.Ss SANDYBRIDGE XEON FIXED FUNCTION PMCS
+These PMCs and their supported events are documented in
+.Xr pmc.iaf 3 .
+.Ss SANDYBRIDGE XEON PROGRAMMABLE PMCS
+The programmable PMCs support the following capabilities:
+.Bl -column "PMC_CAP_INTERRUPT" "Support"
+.It Em Capability Ta Em Support
+.It PMC_CAP_CASCADE Ta \&No
+.It PMC_CAP_EDGE Ta Yes
+.It PMC_CAP_INTERRUPT Ta Yes
+.It PMC_CAP_INVERT Ta Yes
+.It PMC_CAP_READ Ta Yes
+.It PMC_CAP_PRECISE Ta \&No
+.It PMC_CAP_SYSTEM Ta Yes
+.It PMC_CAP_TAGGING Ta \&No
+.It PMC_CAP_THRESHOLD Ta Yes
+.It PMC_CAP_USER Ta Yes
+.It PMC_CAP_WRITE Ta Yes
+.El
+.Ss Event Qualifiers
+Event specifiers for these PMCs support the following common
+qualifiers:
+.Bl -tag -width indent
+.It Li rsp= Ns Ar value
+Configure the Off-core Response bits.
+.Bl -tag -width indent
+.It Li REQ_DMND_DATA_RD
+Counts the number of demand and DCU prefetch data reads of full and partial
+cachelines as well as demand data page table entry cacheline reads. Does not
+count L2 data read prefetches or instruction fetches.
+.It Li REQ_DMND_RFO
+Counts the number of demand and DCU prefetch reads for ownership (RFO)
+requests generated by a write to data cacheline. Does not count L2 RFO
+prefetches.
+.It Li REQ_DMND_IFETCH
+Counts the number of demand and DCU prefetch instruction cacheline reads.
+Does not count L2 code read prefetches.
+.It Li REQ_WB
+Counts the number of writeback (modified to exclusive) transactions.
+.It Li REQ_PF_DATA_RD
+Counts the number of data cacheline reads generated by L2 prefetchers.
+.It Li REQ_PF_RFO
+Counts the number of RFO requests generated by L2 prefetchers.
+.It Li REQ_PF_IFETCH
+Counts the number of code reads generated by L2 prefetchers.
+.It Li REQ_PF_LLC_DATA_RD
+L2 prefetcher to L3 for loads.
+.It Li REQ_PF_LLC_RFO
+RFO requests generated by L2 prefetcher
+.It Li REQ_PF_LLC_IFETCH
+L2 prefetcher to L3 for instruction fetches.
+.It Li REQ_BUS_LOCKS
+Bus lock and split lock requests.
+.It Li REQ_STRM_ST
+Streaming store requests.
+.It Li REQ_OTHER
+Any other request that crosses IDI, including I/O.
+.It Li RES_ANY
+Catch all value for any response types.
+.It Li RES_SUPPLIER_NO_SUPP
+No Supplier Information available.
+.It Li RES_SUPPLIER_LLC_HITM
+M-state initial lookup stat in L3.
+.It Li RES_SUPPLIER_LLC_HITE
+E-state.
+.It Li RES_SUPPLIER_LLC_HITS
+S-state.
+.It Li RES_SUPPLIER_LLC_HITF
+F-state.
+.It Li RES_SUPPLIER_LOCAL
+Local DRAM Controller.
+.It Li RES_SNOOP_SNP_NONE
+No details on snoop-related information.
+.It Li RES_SNOOP_SNP_NO_NEEDED
+No snoop was needed to satisfy the request.
+.It Li RES_SNOOP_SNP_MISS
+A snoop was needed and it missed all snooped caches:
+-For LLC Hit, ReslHitl was returned by all cores
+-For LLC Miss, Rspl was returned by all sockets and data was returned from
+DRAM.
+.It Li RES_SNOOP_HIT_NO_FWD
+A snoop was needed and it hits in at least one snooped cache. Hit denotes a
+cache-line was valid before snoop effect. This includes:
+-Snoop Hit w/ Invalidation (LLC Hit, RFO)
+-Snoop Hit, Left Shared (LLC Hit/Miss, IFetch/Data_RD)
+-Snoop Hit w/ Invalidation and No Forward (LLC Miss, RFO Hit S)
+In the LLC Miss case, data is returned from DRAM.
+.It Li RES_SNOOP_HIT_FWD
+A snoop was needed and data was forwarded from a remote socket.
+This includes:
+-Snoop Forward Clean, Left Shared (LLC Hit/Miss, IFetch/Data_RD/RFT).
+.It Li RES_SNOOP_HITM
+A snoop was needed and it HitM-ed in local or remote cache. HitM denotes a
+cache-line was in modified state before effect as a results of snoop. This
+includes:
+-Snoop HitM w/ WB (LLC miss, IFetch/Data_RD)
+-Snoop Forward Modified w/ Invalidation (LLC Hit/Miss, RFO)
+-Snoop MtoS (LLC Hit, IFetch/Data_RD).
+.It Li RES_NON_DRAM
+Target was non-DRAM system address. This includes MMIO transactions.
+.El
+.It Li cmask= Ns Ar value
+Configure the PMC to increment only if the number of configured
+events measured in a cycle is greater than or equal to
+.Ar value .
+.It Li edge
+Configure the PMC to count the number of de-asserted to asserted
+transitions of the conditions expressed by the other qualifiers.
+If specified, the counter will increment only once whenever a
+condition becomes true, irrespective of the number of clocks during
+which the condition remains true.
+.It Li inv
+Invert the sense of comparison when the
+.Dq Li cmask
+qualifier is present, making the counter increment when the number of
+events per cycle is less than the value specified by the
+.Dq Li cmask
+qualifier.
+.It Li os
+Configure the PMC to count events happening at processor privilege
+level 0.
+.It Li usr
+Configure the PMC to count events occurring at privilege levels 1, 2
+or 3.
+.El
+.Pp
+If neither of the
+.Dq Li os
+or
+.Dq Li usr
+qualifiers are specified, the default is to enable both.
+.Ss Event Specifiers (Programmable PMCs)
+Sandy Bridge Xeon programmable PMCs support the following events:
+.Bl -tag -width indent
+.It Li LD_BLOCKS.DATA_UNKNOWN
+.Pq Event 03H , Umask 01H
+blocked loads due to store buffer blocks with unknown data.
+.It Li LD_BLOCKS.STORE_FORWARD
+.Pq Event 03H , Umask 02H
+loads blocked by overlapping with store buffer that cannot
+be forwarded .
+.It Li LD_BLOCKS.NO_SR
+.Pq Event 03H , Umask 08H
+# of Split loads blocked due to resource not available.
+.It Li LD_BLOCKS.ALL_BLOCK
+.Pq Event 03H , Umask 10H
+Number of cases where any load is blocked but has no
+DCU miss.
+.It Li MISALIGN_MEM_REF.LOADS
+.Pq Event 05H , Umask 01H
+Speculative cache-line split load uops dispatched to
+L1D.
+.It Li MISALIGN_MEM_REF.STORES
+.Pq Event 05H , Umask 02H
+Speculative cache-line split Store- address uops
+dispatchedto L1D.
+.It Li LD_BLOCKS_PARTIAL.ADDRESS_ALIAS
+.Pq Event 07H , Umask 01H
+False dependencies in MOB due to partial compare on
+address.
+.It Li LD_BLOCKS_PARTIAL.ALL_STALL_BLOCK
+.Pq Event 07H , Umask 08H
+The number of times that load operations are temporarily
+blocked because of older stores, with addresses that are
+not yet known. A load operation may incur more than one
+block of this type.
+.It Li TLB_LOAD_MISSES.MISS_CAUSES_A_WALK
+.Pq Event 08H , Umask 01H
+Misses in all TLB levels that cause a page walk of any
+page size.
+.It Li TLB_LOAD_MISSES.WALK_COMPLETED
+.Pq Event 08H , Umask 02H
+Misses in all TLB levels that caused page walk completed
+of any size.
+.It Li DTLB_LOAD_MISSES.WALK_DURATION
+.Pq Event 08H , Umask 04H
+Cycle PMH is busy with a walk.
+.It Li DTLB_LOAD_MISSES.STLB_HIT
+.Pq Event 08H , Umask 10H
+Number of cache load STLB hits. No page walk.
+.It Li INT_MISC.RECOVERY_CYCLES
+.Pq Event 0DH , Umask 03H
+Cycles waiting to recover after Machine Clears or EClear.
+Set Cmask= 1.
+.It Li INT_MISC.RAT_STALL_CYCLES
+.Pq Event 0DH , Umask 40H
+Cycles RAT external stall is sent to IDQ for this thread.
+.It Li UOPS_ISSUED.ANY
+.Pq Event 0EH , Umask 01H
+Increments each cycle the # of Uops issued by the
+RAT to RS.
+Set Cmask = 1, Inv = 1, Any= 1to count stalled cycles
+of this core.
+.It Li FP_COMP_OPS_EXE.X87
+.Pq Event 10H , Umask 01H
+Counts number of X87 uops executed.
+.It Li FP_COMP_OPS_EXE.SSE_FP_PACKED_DOUBLE
+.Pq Event 10H , Umask 10H
+Counts number of SSE* double precision FP packed
+uops executed.
+.It Li FP_COMP_OPS_EXE.SSE_FP_SCALAR_SINGLE
+.Pq Event 10H , Umask 20H
+Counts number of SSE* single precision FP scalar
+uops executed.
+.It Li FP_COMP_OPS_EXE.SSE_PACKED_SINGLE
+.Pq Event 10H , Umask 40H
+Counts number of SSE* single precision FP packed
+uops executed.
+.It Li FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE
+.Pq Event 10H , Umask 80H
+Counts number of SSE* double precision FP scalar
+uops executed.
+.It Li SIMD_FP_256.PACKED_SINGLE
+.Pq Event 11H , Umask 01H
+Counts 256-bit packed single-precision floating-
+point instructions.
+.It Li SIMD_FP_256.PACKED_DOUBLE
+.Pq Event 11H , Umask 02H
+Counts 256-bit packed double-precision floating-
+point instructions.
+.It Li ARITH.FPU_DIV_ACTIVE
+.Pq Event 14H , Umask 01H
+Cycles that the divider is active, includes INT and FP.
+Set 'edge =1, cmask=1' to count the number of
+divides.
+.It Li INSTS_WRITTEN_TO_IQ.INSTS
+.Pq Event 17H , Umask 01H
+Counts the number of instructions written into the
+IQ every cycle.
+.It Li L2_RQSTS.DEMAND_DATA_RD_HIT
+.Pq Event 24H , Umask 01H
+Demand Data Read requests that hit L2 cache.
+.It Li L2_RQSTS.ALL_DEMAND_DATA_RD
+.Pq Event 24H , Umask 03H
+Counts any demand and L1 HW prefetch data load
+requests to L2.
+.It Li L2_RQSTS.RFO_HITS
+.Pq Event 24H , Umask 04H
+Counts the number of store RFO requests that
+hit the L2 cache.
+.It Li L2_RQSTS.RFO_MISS
+.Pq Event 24H , Umask 08H
+Counts the number of store RFO requests that
+miss the L2 cache.
+.It Li L2_RQSTS.ALL_RFO
+.Pq Event 24H , Umask 0CH
+Counts all L2 store RFO requests.
+.It Li L2_RQSTS.CODE_RD_HIT
+.Pq Event 24H , Umask 10H
+Number of instruction fetches that hit the L2
+cache.
+.It Li L2_RQSTS.CODE_RD_MISS
+.Pq Event 24H , Umask 20H
+Number of instruction fetches that missed the L2
+cache.
+.It Li L2_RQSTS.ALL_CODE_RD
+.Pq Event 24H , Umask 30H
+Counts all L2 code requests.
+.It Li L2_RQSTS.PF_HIT
+.Pq Event 24H , Umask 40H
+Requests from L2 Hardware prefetcher that hit L2.
+.It Li L2_RQSTS.PF_MISS
+.Pq Event 24H , Umask 80H
+Requests from L2 Hardware prefetcher that missed
+L2.
+.It Li L2_RQSTS.ALL_PF
+.Pq Event 24H , Umask C0H
+Any requests from L2 Hardware prefetchers.
+.It Li L2_STORE_LOCK_RQSTS.MISS
+.Pq Event 27H , Umask 01H
+ROs that miss cache lines.
+.It Li L2_STORE_LOCK_RQSTS.HIT_E
+.Pq Event 27H , Umask 04H
+RFOs that hit cache lines in E state.
+.It Li L2_STORE_LOCK_RQSTS.HIT_M
+.Pq Event 27H , Umask 08H
+RFOs that hit cache lines in M state.
+.It Li L2_STORE_LOCK_RQSTS.ALL
+.Pq Event 27H , Umask 0FH
+RFOs that access cache lines in any state.
+.It Li L2_L1D_WB_RQSTS.MISS
+.Pq Event 28H , Umask 01H
+Not rejected writebacks from L1D to L2 cache lines
+that missed L2.
+.It Li L2_L1D_WB_RQSTS.HIT_S
+.Pq Event 28H , Umask 02H
+Not rejected writebacks from L1D to L2 cache lines
+in S state.
+.It Li L2_L1D_WB_RQSTS.HIT_E
+.Pq Event 28H , Umask 04H
+Not rejected writebacks from L1D to L2 cache lines
+in E state.
+.It Li L2_L1D_WB_RQSTS.HIT_M
+.Pq Event 28H , Umask 08H
+Not rejected writebacks from L1D to L2 cache lines
+in M state.
+.It Li L2_L1D_WB_RQSTS.ALL
+.Pq Event 28H , Umask 0FH
+Not rejected writebacks from L1D to L2 cache.
+.It Li LONGEST_LAT_CACHE.REFERENCE
+.Pq Event 2EH , Umask 4FH
+This event counts requests originating from the
+core that reference
+a cache line in the last level cache.
+.It Li LONGEST_LAT_CACHE.MISS
+.Pq Event 2EH , Umask 41H
+This event counts each cache miss condition for
+references to the last level cache.
+.It Li CPU_CLK_UNHALTED.THREAD_P
+.Pq Event 3CH , Umask 00H
+Counts the number of thread cycles while the
+thread is not in a halt state. The thread enters
+the halt state when it is running the HLT
+instruction. The core frequency may change from
+time to time due to power or thermal throttling.
+.It Li CPU_CLK_THREAD_UNHALTED.REF_XCLK
+.Pq Event 3CH , Umask 01H
+Increments at the frequency of XCLK (100 MHz)
+when not halted.
+.It Li L1D_PEND_MISS.PENDING
+.Pq Event 48H , Umask 01H
+Increments the number of outstanding L1D misses
+every cycle.
+Set Cmaks = 1 and Edge =1 to count occurrences.
+.It Li DTLB_STORE_MISSES.MISS_CAUSES_A_WALK
+.Pq Event 49H , Umask 01H
+Miss in all TLB levels causes an page walk of
+any page size (4K/2M/4M/1G).
+.It Li DTLB_STORE_MISSES.WALK_COMPLETED
+.Pq Event 49H , Umask 02H
+Miss in all TLB levels causes a page walk that
+completes of any page size (4K/2M/4M/1G).
+.It Li DTLB_STORE_MISSES.WALK_DURATION
+.Pq Event 49H , Umask 04H
+Cycles PMH is busy with this walk.
+.It Li DTLB_STORE_MISSES.STLB_HIT
+.Pq Event 49H , Umask 10H
+Store operations that miss the first TLB level
+but hit the second and do not cause page walks.
+.It Li LOAD_HIT_PRE.SW_PF
+.Pq Event 4CH , Umask 01H
+Not SW-prefetch load dispatches that hit fill
+buffer allocated for S/W prefetch.
+.It Li LOAD_HIT_PER.HW_PF
+.Pq Event 4CH , Umask 02H
+Not SW-prefetch load dispatches that hit fill
+buffer allocated for H/W prefetch.
+.It Li HW_PRE_REQ.DL1_MISS
+.Pq Event 4EH , Umask 02H
+Hardware Prefetch requests that miss the L1D
+cache. A request is being counted each time
+it access the cache & miss it, including if
+a block is applicable or if hit the Fill
+Buffer for example.
+.It Li L1D.REPLACEMENT
+.Pq Event 51H , Umask 01H
+Counts the number of lines brought into the
+L1 data cache.
+.It Li L1D.ALLOCATED_IN_M
+.Pq Event 51H , Umask 02H
+Counts the number of allocations of modified
+L1D cache lines.
+.It Li L1D.EVICTION
+.Pq Event 51H , Umask 04H
+Counts the number of modified lines evicted
+from the L1 data cache due to replacement.
+.It Li L1D.ALL_M_REPLACEMENT
+.Pq Event 51H , Umask 08H
+Cache lines in M state evicted out of L1D due
+to Snoop HitM or dirty line replacement.
+.It Li PARTIAL_RAT_STALLS.FLAGS_MERGE_UOP
+.Pq Event 59H , Umask 0CH
+Increments the number of flags-merge uops in
+flight each cycle.
+Set Cmask = 1 to count cycles.
+.It Li PARTIAL_RAT_STALLS.SLOW_LEA_WINDOW
+.Pq Event 59H , Umask 0FH
+Cycles with at least one slow LEA uop allocated.
+.It Li PARTIAL_RAT_STALLS.MUL_SINGLE_UOP
+.Pq Event 59H , Umask 40H
+Number of Multiply packed/scalar single precision
+uops allocated.
+.It Li RESOURCE_STALLS2.ALL_FL_EMPTY
+.Pq Event 5BH , Umask 0CH
+Cycles stalled due to free list empty.
+.It Li RESOURCE_STALLS2.ALL_PRF_CONTROL
+.Pq Event 5BH , Umask 0FH
+Cycles stalled due to control structures full for
+physical registers.
+.It Li RESOURCE_STALLS2.BOB_FULL
+.Pq Event 5BH , Umask 40H
+Cycles Allocator is stalled due Branch Order Buffer.
+.It Li RESOURCE_STALLS2.OOO_RSRC
+.Pq Event 5BH , Umask 4FH
+Cycles stalled due to out of order resources full.
+.It Li CPL_CYCLES.RING0
+.Pq Event 5CH , Umask 01H
+Unhalted core cycles when the thread is in ring 0.
+.It Li CPL_CYCLES.RING123
+.Pq Event 5CH , Umask 02H
+Unhalted core cycles when the thread is not in ring
+0.
+.It Li RS_EVENTS.EMPTY_CYCLES
+.Pq Event 5EH , Umask 01H
+Cycles the RS is empty for the thread.
+.It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD
+.Pq Event 60H , Umask 01H
+Offcore outstanding Demand Data Read
+transactions in SQ to uncore. Set Cmask=1 to count
+cycles.
+.It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO
+.Pq Event 60H , Umask 04H
+Offcore outstanding RFO store transactions in SQ to
+uncore. Set Cmask=1 to count cycles.
+.It Li OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD
+.Pq Event 60H , Umask 08H
+Offcore outstanding cacheable data read
+transactions in SQ to uncore. Set Cmask=1 to count
+cycles.
+.It Li LOCK_CYCLES.SPLIT_LOCK_UC_LOCK_DURATION
+.Pq Event 63H , Umask 01H
+Cycles in which the L1D and L2 are locked, due to a
+UC lock or split lock.
+.It Li LOCK_CYCLES.CACHE_LOCK_DURATION
+.Pq Event 63H , Umask 02H
+Cycles in which the L1D is locked.
+.It Li IDQ.EMPTY
+.Pq Event 79H , Umask 02H
+Counts cycles the IDQ is empty.
+.It Li IDQ.MITE_UOPS
+.Pq Event 79H , Umask 04H
+Increment each cycle # of uops delivered to IDQ
+from MITE path.
+Set Cmask = 1 to count cycles.
+.It Li IDQ.DSB_UOPS
+.Pq Event 79H , Umask 08H
+Increment each cycle. # of uops delivered to IDQ
+from DSB path.
+Set Cmask = 1 to count cycles.
+.It Li IDQ.MS_DSB_UOPS
+.Pq Event 79H , Umask 10H
+Increment each cycle # of uops delivered to IDQ
+when MS busy by DSB. Set Cmask = 1 to count
+cycles MS is busy. Set Cmask=1 and Edge =1 to
+count MS activations.
+.It Li IDQ.MS_MITE_UOPS
+.Pq Event 79H , Umask 20H
+Increment each cycle # of uops delivered to IDQ
+when MS is busy by MITE. Set Cmask = 1 to count
+cycles.
+.It Li IDQ.MS_UOPS
+.Pq Event 79H , Umask 30H
+Increment each cycle # of uops delivered to IDQ
+from MS by either DSB or MITE. Set Cmask = 1 to
+count cycles.
+.It Li ICACHE.MISSES
+.Pq Event 80H , Umask 02H
+Number of Instruction Cache, Streaming Buffer and
+Victim Cache Misses. Includes UC accesses.
+.It Li ITLB_MISSES.MISS_CAUSES_A_WALK
+.Pq Event 85H , Umask 01H
+Misses in all ITLB levels that cause page walks.
+.It Li ITLB_MISSES.WALK_COMPLETED
+.Pq Event 85H , Umask 02H
+Misses in all ITLB levels that cause completed page
+walks.
+.It Li ITLB_MISSES.WALK_DURATION
+.Pq Event 85H , Umask 04H
+Cycle PMH is busy with a walk.
+.It Li ITLB_MISSES.STLB_HIT
+.Pq Event 85H , Umask 10H
+Number of cache load STLB hits. No page walk.
+.It Li ILD_STALL.LCP
+.Pq Event 87H , Umask 01H
+Stalls caused by changing prefix length of the
+instruction.
+.It Li ILD_STALL.IQ_FULL
+.Pq Event 87H , Umask 04H
+Stall cycles due to IQ is full.
+.It Li BR_INST_EXEC.COND
+.Pq Event 88H , Umask 01H
+Qualify conditional near branch instructions
+executed, but not necessarily retired.
+.It Li BR_INST_EXEC.DIRECT_JMP
+.Pq Event 88H , Umask 02H
+Qualify all unconditional near branch instructions
+excluding calls and indirect branches.
+.It Li BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET
+.Pq Event 88H , Umask 04H
+Qualify executed indirect near branch instructions
+that are not calls nor returns.
+.It Li BR_INST_EXEC.RETURN_NEAR
+.Pq Event 88H , Umask 08H
+Qualify indirect near branches that have a return
+mnemonic.
+.It Li BR_INST_EXEC.DIRECT_NEAR_CALL
+.Pq Event 88H , Umask 10H
+Qualify unconditional near call branch instructions,
+excluding non call branch, executed.
+.It Li BR_INST_EXEC.INDIRECT_NEAR_CALL
+.Pq Event 88H , Umask 20H
+Qualify indirect near calls, including both register
+and memory indirect, executed.
+.It Li BR_INST_EXEC.NONTAKEN
+.Pq Event 88H , Umask 40H
+Qualify non-taken near branches executed.
+.It Li BR_INST_EXEC.TAKEN
+.Pq Event 88H , Umask 80H
+Qualify taken near branches executed. Must
+combine with 01H,02H, 04H, 08H, 10H, 20H.
+.It Li BR_INST_EXE.ALL_BRANCHES
+.Pq Event 88H , Umask FFH
+Counts all near executed branches (not necessarily
+retired).
+.It Li BR_MISP_EXEC.COND
+.Pq Event 89H , Umask 01H
+Qualify conditional near branch instructions
+mispredicted.
+.It Li BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET
+.Pq Event 89H , Umask 04H
+Qualify mispredicted indirect near branch
+instructions that are not calls nor returns.
+.It Li BR_MISP_EXEC.RETURN_NEAR
+.Pq Event 89H , Umask 08H
+Qualify mispredicted indirect near branches that
+have a return mnemonic.
+.It Li BR_MISP_EXEC.DIRECT_NEAR_CALL
+.Pq Event 89H , Umask 10H
+Qualify mispredicted unconditional near call branch
+instructions, excluding non call branch, executed.
+.It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL
+.Pq Event 89H , Umask 20H
+Qualify mispredicted indirect near calls, including
+both register and memory indirect, executed.
+.It Li BR_MISP_EXEC.NONTAKEN
+.Pq Event 89H , Umask 40H
+Qualify mispredicted non-taken near branches
+executed,.
+.It Li BR_MISP_EXEC.TAKEN
+.Pq Event 89H , Umask 80H
+Qualify mispredicted taken near branches executed.
+Must combine with 01H,02H, 04H, 08H, 10H, 20H
+.It Li BR_MISP_EXEC.ALL_BRANCHES
+.Pq Event 89H , Umask FFH
+Counts all near executed branches (not necessarily
+retired).
+.It Li IDQ_UOPS_NOT_DELIVERED.CORE
+.Pq Event 9CH , Umask 01H
+Count number of non-delivered uops to RAT per
+thread.
+.It Li UOPS_DISPATCHED_PORT.PORT_0
+.Pq Event A1H , Umask 01H
+Cycles which a Uop is dispatched on port 0.
+.It Li UOPS_DISPATCHED_PORT.PORT_1
+.Pq Event A1H , Umask 02H
+Cycles which a Uop is dispatched on port 1.
+.It Li UOPS_DISPATCHED_PORT.PORT_2_LD
+.Pq Event A1H , Umask 04H
+Cycles which a load uop is dispatched on port 2.
+.It Li UOPS_DISPATCHED_PORT.PORT_2_STA
+.Pq Event A1H , Umask 08H
+Cycles which a store address uop is dispatched on
+port 2.
+.It Li UOPS_DISPATCHED_PORT.PORT_2
+.Pq Event A1H , Umask 0CH
+Cycles which a Uop is dispatched on port 2.
+.It Li UOPS_DISPATCHED_PORT.PORT_3_LD
+.Pq Event A1H , Umask 10H
+Cycles which a load uop is dispatched on port 3.
+.It Li UOPS_DISPATCHED_PORT.PORT_3_STA
+.Pq Event A1H , Umask 20H
+Cycles which a store address uop is dispatched on
+port 3.
+.It Li UOPS_DISPATCHED_PORT.PORT_3
+.Pq Event A1H , Umask 30H
+Cycles which a Uop is dispatched on port 3.
+.It Li UOPS_DISPATCHED_PORT.PORT_4
+.Pq Event A1H , Umask 40H
+Cycles which a Uop is dispatched on port 4.
+.It Li UOPS_DISPATCHED_PORT.PORT_5
+.Pq Event A1H , Umask 80H
+Cycles which a Uop is dispatched on port 5.
+.It Li RESOURCE_STALLS.ANY
+.Pq Event A2H , Umask 01H
+Cycles Allocation is stalled due to Resource Related
+reason.
+.It Li RESOURCE_STALLS.LB
+.Pq Event A2H , Umask 01H
+Counts the cycles of stall due to lack of load buffers.
+.It Li RESOURCE_STALLS.RS
+.Pq Event A2H , Umask 04H
+Cycles stalled due to no eligible RS entry available.
+.It Li RESOURCE_STALLS.SB
+.Pq Event A2H , Umask 08H
+Cycles stalled due to no store buffers available. (not
+including draining form sync).
+.It Li RESOURCE_STALLS.ROB
+.Pq Event A2H , Umask 10H
+Cycles stalled due to re-order buffer full.
+.It Li RESOURCE_STALLS.FCSW
+.Pq Event A2H , Umask 20H
+Cycles stalled due to writing the FPU control word.
+.It Li RESOURCE_STALLS.MXCSR
+.Pq Event A2H , Umask 40H
+Cycles stalled due to the MXCSR register rename
+occurring to close to a previous MXCSR rename.
+.It Li RESOURCE_STALLS.OTHER
+.Pq Event A2H , Umask 80H
+Cycles stalled while execution was stalled due to
+other resource issues.
+.It Li CYCLE_ACTIVITY.CYCLES_L2_PENDING
+.Pq Event A3H , Umask 01H
+Cycles with pending L2 miss loads. Set AnyThread
+to count per core.
+.It Li CYCLE_ACTIVITY.CYCLES_L1D_PENDING
+.Pq Event A3H , Umask 02H
+Cycles with pending L1 cache miss loads.Set
+AnyThread to count per core.
+.It Li CYCLE_ACTIVITY.CYCLES_NO_DISPATCH
+.Pq Event A3H , Umask 04H
+Cycles of dispatch stalls. Set AnyThread to count per
+core.
+.It Li DSB2MITE_SWITCHES.COUNT
+.Pq Event ABH , Umask 01H
+Number of DSB to MITE switches.
+.It Li DSB2MITE_SWITCHES.PENALTY_CYCLES
+.Pq Event ABH , Umask 02H
+Cycles DSB to MITE switches caused delay.
+.It Li DSB_FILL.OTHER_CANCEL
+.Pq Event ACH , Umask 02H
+Cases of cancelling valid DSB fill not because of
+exceeding way limit.
+.It Li DSB_FILL.EXCEED_DSB_LINES
+.Pq Event ACH , Umask 08H
+DSB Fill encountered > 3 DSB lines.
+.It Li DSB_FILL.ALL_CANCEL
+.Pq Event ACH , Umask 0AH
+Cases of cancelling valid Decode Stream Buffer
+(DSB) fill not because of exceeding way limit.
+.It Li ITLB.ITLB_FLUSH
+.Pq Event AEH , Umask 01H
+Counts the number of ITLB flushes, includes
+4k/2M/4M pages.
+.It Li OFFCORE_REQUESTS.DEMAND_DATA_RD
+.Pq Event B0H , Umask 01H
+Demand data read requests sent to uncore.
+.It Li OFFCORE_REQUESTS.DEMAND_RFO
+.Pq Event B0H , Umask 04H
+Demand RFO read requests sent to uncore, including
+regular RFOs, locks, ItoM.
+.It Li OFFCORE_REQUESTS.ALL_DATA_RD
+.Pq Event B0H , Umask 08H
+Data read requests sent to uncore (demand and
+prefetch).
+.It Li UOPS_DISPATCHED.THREAD
+.Pq Event B1H , Umask 01H
+Counts total number of uops to be dispatched per-
+thread each cycle. Set Cmask = 1, INV =1 to count
+stall cycles.
+.It Li UOPS_DISPATCHED.CORE
+.Pq Event B1H , Umask 02H
+Counts total number of uops to be dispatched per-
+core each cycle.
+.It Li OFFCORE_REQUESTS_BUFFER.SQ_FULL
+.Pq Event B2H , Umask 01H
+Offcore requests buffer cannot take more entries
+for this thread core.
+.It Li AGU_BYPASS_CANCEL.COUNT
+.Pq Event B6H , Umask 01H
+Counts executed load operations with all the
+following traits: 1. addressing of the format [base +
+offset], 2. the offset is between 1 and 2047, 3. the
+address specified in the base register is in one page
+and the address [base+offset] is in another page.
+.It Li OFF_CORE_RESPONSE_0
+.Pq Event B7H , Umask 01H
+(Event B7H, Umask 01H) Off-core Response Performance
+Monitoring; PMC0 only. Requires programming MSR 01A6H
+.It Li OFF_CORE_RESPONSE_1
+.Pq Event BBH , Umask 01H
+(Event BBH, Umask 01H) Off-core Response Performance
+Monitoring; PMC3 only. Requires programming MSR 01A7H
+.It Li TLB_FLUSH.DTLB_THREAD
+.Pq Event BDH , Umask 01H
+DTLB flush attempts of the thread-specific entries.
+.It Li TLB_FLUSH.STLB_ANY
+.Pq Event BDH , Umask 20H
+Count number of STLB flush attempts.
+.It Li L1D_BLOCKS.BANK_CONFLICT_CYCLES
+.Pq Event BFH , Umask 05H
+Cycles when dispatched loads are cancelled due to
+L1D bank conflicts with other load ports.
+.It Li INST_RETIRED.ANY_P
+.Pq Event C0H , Umask 00H
+Number of instructions at retirement.
+.It Li INST_RETIRED.ALL
+.Pq Event C0H , Umask 01H
+Precise instruction retired event with HW to reduce
+effect of PEBS shadow in IP distribution.
+.It Li OTHER_ASSISTS.ITLB_MISS_RETIRED
+.Pq Event C1H , Umask 02H
+Instructions that experienced an ITLB miss.
+.It Li OTHER_ASSISTS.AVX_STORE
+.Pq Event C1H , Umask 08H
+Number of assists associated with 256-bit AVX
+store operations.
+.It Li OTHER_ASSISTS.AVX_TO_SSE
+.Pq Event C1H , Umask 10H
+Number of transitions from AVX-256 to legacy SSE
+when penalty applicable.
+.It Li OTHER_ASSISTS.SSE_TO_AVX
+.Pq Event C1H , Umask 20H
+Number of transitions from SSE to AVX-256 when
+penalty applicable.
+.It Li UOPS_RETIRED.ALL
+.Pq Event C2H , Umask 01H
+Counts the number of micro-ops retired, Use
+cmask=1 and invert to count active cycles or stalled
+cycles.
+.It Li UOPS_RETIRED.RETIRE_SLOTS
+.Pq Event C2H , Umask 02H
+Counts the number of retirement slots used each
+cycle.
+.It Li MACHINE_CLEARS.MEMORY_ORDERING
+.Pq Event C3H , Umask 02H
+Counts the number of machine clears due to
+memory order conflicts.
+.It Li MACHINE_CLEARS.SMC
+.Pq Event C3H , Umask 04H
+Counts the number of times that a program writes
+to a code section.
+.It Li MACHINE_CLEARS.MASKMOV
+.Pq Event C3H , Umask 20H
+Counts the number of executed AVX masked load
+operations that refer to an illegal address range
+with the mask bits set to 0.
+.It Li BR_INST_RETIRED.ALL_BRANCH
+.Pq Event C4H , Umask 00H
+Branch instructions at retirement.
+.It Li BR_INST_RETIRED.CONDITIONAL
+.Pq Event C4H , Umask 01H
+Counts the number of conditional branch
+instructions retired.
+.It Li BR_INST_RETIRED.NEAR_CALL
+.Pq Event C4H , Umask 02H
+Direct and indirect near call instructions retired.
+.It Li BR_INST_RETIRED.ALL_BRANCHES
+.Pq Event C4H , Umask 04H
+Counts the number of branch instructions retired.
+.It Li BR_INST_RETIRED.NEAR_RETURN
+.Pq Event C4H , Umask 08H
+Counts the number of near return instructions
+retired.
+.It Li BR_INST_RETIRED.NOT_TAKEN
+.Pq Event C4H , Umask 10H
+Counts the number of not taken branch instructions
+retired.
+.It Li BR_INST_RETIRED.NEAR_TAKEN
+.Pq Event C4H , Umask 20H
+Number of near taken branches retired.
+.It Li BR_INST_RETIRED.FAR_BRANCH
+.Pq Event C4H , Umask 40H
+Number of far branches retired.
+.It Li BR_MISP_RETIRED.ALL_BRANCHES
+.Pq Event C5H , Umask 00H
+Mispredicted branch instructions at retirement.
+.It Li BR_MISP_RETIRED.CONDITIONAL
+.Pq Event C5H , Umask 01H
+Mispredicted conditional branch instructions retired.
+.It Li BR_MISP_RETIRED.NEAR_CALL
+.Pq Event C5H , Umask 02H
+Direct and indirect mispredicted near call
+instructions retired.
+.It Li BR_MISP_RETIRED.ALL_BRANCHES
+.Pq Event C5H , Umask 04H
+Mispredicted macro branch instructions retired.
+.It Li BR_MISP_RETIRED.NOT_TAKEN
+.Pq Event C5H , Umask 10H
+Mispredicted not taken branch instructions retired.
+.It Li BR_MISP_RETIRED.TAKEN
+.Pq Event C5H , Umask 20H
+Mispredicted taken branch instructions retired.
+.It Li FP_ASSIST.X87_OUTPUT
+.Pq Event CAH , Umask 02H
+Number of X87 assists due to output value.
+.It Li FP_ASSIST.X87_INPUT
+.Pq Event CAH , Umask 04H
+Number of X87 assists due to input value.
+.It Li FP_ASSIST.SIMD_OUTPUT
+.Pq Event CAH , Umask 08H
+ Number of SIMD FP assists due to output values.
+.It Li FP_ASSIST.SIMD_INPUT
+.Pq Event CAH , Umask 10H
+Number of SIMD FP assists due to input values.
+.It Li FP_ASSIST.ANY 1EH
+.Pq Event CAH , Umask
+Cycles with any input/output SSE* or FP assists.
+.It Li ROB_MISC_EVENTS.LBR_INSERTS
+.Pq Event CCH , Umask 20H
+Count cases of saving new LBR records by
+hardware.
+.It Li MEM_TRANS_RETIRED.LOAD_LATENCY
+.Pq Event CDH , Umask 01H
+Sample loads with specified latency threshold.
+PMC3 only.
+.It Li MEM_TRANS_RETIRED.PRECISE_STORE
+.Pq Event CDH , Umask 02H
+Sample stores and collect precise store operation
+via PEBS record. PMC3 only.
+.It Li MEM_UOP_RETIRED.LOADS
+.Pq Event D0H , Umask 10H
+Qualify retired memory uops that are loads.
+Combine with umask 10H, 20H, 40H, 80H.
+.It Li MEM_UOP_RETIRED.STORES
+.Pq Event D0H , Umask 02H
+Qualify retired memory uops that are stores.
+Combine with umask 10H, 20H, 40H, 80H.
+.It Li MEM_UOP_RETIRED.STLB_MISS
+.Pq Event D0H , Umask
+Qualify retired memory uops with STLB miss. Must
+combine with umask 01H, 02H, to produce counts.
+.It Li MEM_UOP_RETIRED.LOCK
+.Pq Event D0H , Umask
+Qualify retired memory uops with lock. Must
+combine with umask 01H, 02H, to produce counts.
+.It Li MEM_UOP_RETIRED.SPLIT
+.Pq Event D0H , Umask
+Qualify retired memory uops with line split. Must
+combine with umask 01H, 02H, to produce counts.
+.It Li MEM_UOP_RETIRED_ALL
+.Pq Event D0H , Umask
+Qualify any retired memory uops. Must combine
+with umask 01H, 02H, to produce counts.
+.It Li MEM_LOAD_UOPS_RETIRED.L1_HIT
+.Pq Event D1H , Umask 01H
+Retired load uops with L1 cache hits as data
+sources.
+.It Li MEM_LOAD_UOPS_RETIRED.L2_HIT
+.Pq Event D1H , Umask 02H
+Retired load uops with L2 cache hits as data
+sources.
+.It Li MEM_LOAD_UOPS_RETIRED.LLC_HIT
+.Pq Event D1H , Umask 04H
+Retired load uops which data sources were data hits
+in LLC without snoops required.
+.It Li MEM_LOAD_UOPS_RETIRED.LLC_MISS
+.Pq Event D1H , Umask 20H
+Retired load uops which data sources were data
+missed LLC (excluding unknown data source).
+.It Li MEM_LOAD_UOPS_RETIRED.HIT_LFB
+.Pq Event D1H , Umask 40H
+Retired load uops which data sources were load
+uops missed L1 but hit FB due to preceding miss to
+the same cache line with data not ready.
+.It Li MEM_LOAD_UOPS_MISC_RETIRED.LLC_MISS
+.Pq Event D4H , Umask 02H
+Retired load uops with unknown information as data
+source in cache serviced the load.
+.It Li BACLEARS.ANY
+.Pq Event E6H , Umask 01H
+Counts the number of times the front end is re-
+steered, mainly when the BPU cannot provide a
+correct prediction and this is corrected by other
+branch handling mechanisms at the front end.
+.It Li L2_TRANS.DEMAND_DATA_RD
+.Pq Event F0H , Umask 01H
+Demand Data Read requests that access L2 cache.
+.It Li L2_TRANS.RFO
+.Pq Event F0H , Umask 02H
+RFO requests that access L2 cache.
+.It Li L2_TRANS.CODE_RD
+.Pq Event F0H , Umask 04H
+L2 cache accesses when fetching instructions.
+.It Li L2_TRANS.ALL_PF
+.Pq Event F0H , Umask 08H
+L2 or LLC HW prefetches that access L2 cache.
+.It Li L2_TRANS.L1D_WB
+.Pq Event F0H , Umask 10H
+L1D writebacks that access L2 cache.
+.It Li L2_TRANS.L2_FILL
+.Pq Event F0H , Umask 20H
+L2 fill requests that access L2 cache.
+.It Li L2_TRANS.L2_WB
+.Pq Event F0H , Umask 40H
+L2 writebacks that access L2 cache.
+.It Li L2_TRANS.ALL_REQUESTS
+.Pq Event F0H , Umask 80H
+Transactions accessing L2 pipe.
+.It Li L2_LINES_IN.I
+.Pq Event F1H , Umask 01H
+L2 cache lines in I state filling L2.
+.It Li L2_LINES_IN.S
+.Pq Event F1H , Umask 02H
+L2 cache lines in S state filling L2.
+.It Li L2_LINES_IN.E
+.Pq Event F1H , Umask 04H
+L2 cache lines in E state filling L2.
+.It Li L2_LINES-IN.ALL
+.Pq Event F1H , Umask 07H
+L2 cache lines filling L2.
+.It Li L2_LINES_OUT.DEMAND_CLEAN
+.Pq Event F2H , Umask 01H
+Clean L2 cache lines evicted by demand.
+.It Li L2_LINES_OUT.DEMAND_DIRTY
+.Pq Event F2H , Umask 02H
+Dirty L2 cache lines evicted by demand.
+.It Li L2_LINES_OUT.PF_CLEAN
+.Pq Event F2H , Umask 04H
+Clean L2 cache lines evicted by L2 prefetch.
+.It Li L2_LINES_OUT.PF_DIRTY
+.Pq Event F2H , Umask 08H
+Dirty L2 cache lines evicted by L2 prefetch.
+.It Li L2_LINES_OUT.DIRTY_ALL
+.Pq Event F2H , Umask 0AH
+Dirty L2 cache lines filling the L2.
+.It Li SQ_MISC.SPLIT_LOCK
+.Pq Event F4H , Umask 10H
+Split locks in SQ.
+.El
+.Sh SEE ALSO
+.Xr pmc 3 ,
+.Xr pmc.atom 3 ,
+.Xr pmc.core 3 ,
+.Xr pmc.iaf 3 ,
+.Xr pmc.ucf 3 ,
+.Xr pmc.k7 3 ,
+.Xr pmc.k8 3 ,
+.Xr pmc.p4 3 ,
+.Xr pmc.p5 3 ,
+.Xr pmc.p6 3 ,
+.Xr pmc.corei7 3 ,
+.Xr pmc.corei7uc 3 ,
+.Xr pmc.ivybridge 3 ,
+.Xr pmc.sandybridge 3 ,
+.Xr pmc.sandybridgeuc 3 ,
+.Xr pmc.westmere 3 ,
+.Xr pmc.westmereuc 3 ,
+.Xr pmc.soft 3 ,
+.Xr pmc.tsc 3 ,
+.Xr pmc_cpuinfo 3 ,
+.Xr pmclog 3 ,
+.Xr hwpmc 4
+.Sh HISTORY
+The
+.Nm pmc
+library first appeared in
+.Fx 6.0 .
+.Sh AUTHORS
+The
+.Lb libpmc
+library was written by
+.An "Joseph Koshy"
+.Aq jkoshy@FreeBSD.org .
+The support for the Sandy Bridge Xeon
+microarchitecture was written by
+.An "Hiren Panchasara"
+.Aq hiren.panchasara@gmail.com .
diff --git a/lib/libproc/Makefile b/lib/libproc/Makefile
index c02e719..4449c06 100644
--- a/lib/libproc/Makefile
+++ b/lib/libproc/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
LIB= proc
SRCS= proc_bkpt.c \
@@ -13,6 +15,14 @@ INCS= libproc.h
CFLAGS+= -I${.CURDIR}
+.if ${MK_LIBCPLUSPLUS} != "no"
+LDADD+= -lcxxrt
+DPADD+= ${LIBCXXRT}
+.else
+LDADD+= -lsupc++
+DPADD+= ${LIBSTDCPLUSPLUS}
+.endif
+
SHLIB_MAJOR= 2
WITHOUT_MAN=
diff --git a/lib/libproc/Makefile.depend b/lib/libproc/Makefile.depend
new file mode 100644
index 0000000..29fda55
--- /dev/null
+++ b/lib/libproc/Makefile.depend
@@ -0,0 +1,14 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libproc/proc_sym.c b/lib/libproc/proc_sym.c
index 1d56df0..4bef7f0 100644
--- a/lib/libproc/proc_sym.c
+++ b/lib/libproc/proc_sym.c
@@ -46,9 +46,31 @@
#include "_libproc.h"
+extern char *__cxa_demangle(const char *, char *, size_t *, int *);
+
static void proc_rdl2prmap(rd_loadobj_t *, prmap_t *);
static void
+demangle(const char *symbol, char *buf, size_t len)
+{
+ char *dembuf;
+ size_t demlen = len;
+
+ dembuf = malloc(len);
+ if (!dembuf)
+ goto fail;
+ dembuf = __cxa_demangle(symbol, dembuf, &demlen, NULL);
+ if (!dembuf)
+ goto fail;
+ strlcpy(buf, dembuf, len);
+ free(dembuf);
+
+ return;
+fail:
+ strlcpy(buf, symbol, len);
+}
+
+static void
proc_rdl2prmap(rd_loadobj_t *rdl, prmap_t *map)
{
map->pr_vaddr = rdl->rdl_saddr;
@@ -254,7 +276,7 @@ proc_addr2sym(struct proc_handle *p, uintptr_t addr, char *name,
*/
if ((data = elf_getdata(dynsymscn, NULL)) == NULL) {
DPRINTF("ERROR: elf_getdata() failed");
- goto err2;
+ goto symtab;
}
i = 0;
while (gelf_getsym(data, i++, &sym) != NULL) {
@@ -266,7 +288,10 @@ proc_addr2sym(struct proc_handle *p, uintptr_t addr, char *name,
if (addr >= rsym && addr <= (rsym + sym.st_size)) {
s = elf_strptr(e, dynsymstridx, sym.st_name);
if (s) {
- strlcpy(name, s, namesz);
+ if (s[0] == '_' && s[1] == 'Z' && s[2])
+ demangle(s, name, namesz);
+ else
+ strlcpy(name, s, namesz);
memcpy(symcopy, &sym, sizeof(sym));
/*
* DTrace expects the st_value to contain
@@ -274,11 +299,11 @@ proc_addr2sym(struct proc_handle *p, uintptr_t addr, char *name,
* the function.
*/
symcopy->st_value = rsym;
- error = 0;
goto out;
}
}
}
+symtab:
/*
* Iterate over the Symbols Table to find the symbol.
* Then look up the string name in STRTAB (.dynstr)
@@ -302,7 +327,10 @@ proc_addr2sym(struct proc_handle *p, uintptr_t addr, char *name,
if (addr >= rsym && addr <= (rsym + sym.st_size)) {
s = elf_strptr(e, symtabstridx, sym.st_name);
if (s) {
- strlcpy(name, s, namesz);
+ if (s[0] == '_' && s[1] == 'Z' && s[2])
+ demangle(s, name, namesz);
+ else
+ strlcpy(name, s, namesz);
memcpy(symcopy, &sym, sizeof(sym));
/*
* DTrace expects the st_value to contain
@@ -430,18 +458,17 @@ proc_name2sym(struct proc_handle *p, const char *object, const char *symbol,
* Iterate over the Dynamic Symbols table to find the symbol.
* Then look up the string name in STRTAB (.dynstr)
*/
- if ((data = elf_getdata(dynsymscn, NULL)) == NULL) {
+ if ((data = elf_getdata(dynsymscn, NULL))) {
DPRINTF("ERROR: elf_getdata() failed");
- goto err2;
- }
- i = 0;
- while (gelf_getsym(data, i++, &sym) != NULL) {
- s = elf_strptr(e, dynsymstridx, sym.st_name);
- if (s && strcmp(s, symbol) == 0) {
- memcpy(symcopy, &sym, sizeof(sym));
- symcopy->st_value = map->pr_vaddr + sym.st_value;
- error = 0;
- goto out;
+ i = 0;
+ while (gelf_getsym(data, i++, &sym) != NULL) {
+ s = elf_strptr(e, dynsymstridx, sym.st_name);
+ if (s && strcmp(s, symbol) == 0) {
+ memcpy(symcopy, &sym, sizeof(sym));
+ symcopy->st_value = map->pr_vaddr + sym.st_value;
+ error = 0;
+ goto out;
+ }
}
}
/*
@@ -450,17 +477,15 @@ proc_name2sym(struct proc_handle *p, const char *object, const char *symbol,
*/
if (symtabscn == NULL)
goto err2;
- if ((data = elf_getdata(symtabscn, NULL)) == NULL) {
- DPRINTF("ERROR: elf_getdata() failed");
- goto err2;
- }
- i = 0;
- while (gelf_getsym(data, i++, &sym) != NULL) {
- s = elf_strptr(e, symtabstridx, sym.st_name);
- if (s && strcmp(s, symbol) == 0) {
- memcpy(symcopy, &sym, sizeof(sym));
- error = 0;
- goto out;
+ if ((data = elf_getdata(symtabscn, NULL))) {
+ i = 0;
+ while (gelf_getsym(data, i++, &sym) != NULL) {
+ s = elf_strptr(e, symtabstridx, sym.st_name);
+ if (s && strcmp(s, symbol) == 0) {
+ memcpy(symcopy, &sym, sizeof(sym));
+ error = 0;
+ goto out;
+ }
}
}
out:
diff --git a/lib/libproc/test/t1-bkpt/t1-bkpt.c b/lib/libproc/test/t1-bkpt/t1-bkpt.c
index 6b4e2fa..37a9fcf 100644
--- a/lib/libproc/test/t1-bkpt/t1-bkpt.c
+++ b/lib/libproc/test/t1-bkpt/t1-bkpt.c
@@ -50,12 +50,12 @@ t1_bkpt_d()
unsigned long saved;
proc_create("./t1-bkpt", targv, NULL, NULL, &phdl);
- proc_bkptset(phdl, (uintptr_t)t1_bkpt_t, &saved);
+ assert(proc_bkptset(phdl, (uintptr_t)t1_bkpt_t, &saved) == 0);
proc_continue(phdl);
- assert(WIFSTOPPED(proc_wstatus(phdl)));
+ assert(proc_wstatus(phdl) == PS_STOP);
proc_bkptexec(phdl, saved);
proc_continue(phdl);
- proc_wait(phdl);
+ proc_wstatus(phdl);
proc_free(phdl);
}
diff --git a/lib/libproc/test/t3-name2sym/t3-name2sym.c b/lib/libproc/test/t3-name2sym/t3-name2sym.c
index 6d90a48..0be8653 100644
--- a/lib/libproc/test/t3-name2sym/t3-name2sym.c
+++ b/lib/libproc/test/t3-name2sym/t3-name2sym.c
@@ -33,6 +33,7 @@
#include <stdio.h>
#include <libproc.h>
#include <gelf.h>
+#include <string.h>
int
main(int argc, char *argv[])
diff --git a/lib/libprocstat/Makefile b/lib/libprocstat/Makefile
index 9804483..a29afc7 100644
--- a/lib/libprocstat/Makefile
+++ b/lib/libprocstat/Makefile
@@ -8,8 +8,6 @@ SRCS= cd9660.c \
common_kvm.c \
libprocstat.c \
msdosfs.c \
- ntfs.c \
- smbfs.c \
udf.c
VERSION_DEF= ${.CURDIR}/Versions.def
@@ -24,11 +22,6 @@ LDADD= -lkvm -lutil
MAN= libprocstat.3
-.if ${MK_NCP} != "no"
-CFLAGS+= -DLIBPROCSTAT_NWFS
-SRCS+= nwfs.c
-.endif
-
# XXX This is a hack.
.if ${MK_CDDL} != "no"
CFLAGS+= -DLIBPROCSTAT_ZFS
diff --git a/lib/libprocstat/Makefile.depend b/lib/libprocstat/Makefile.depend
new file mode 100644
index 0000000..4a51c12
--- /dev/null
+++ b/lib/libprocstat/Makefile.depend
@@ -0,0 +1,19 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libkvm \
+ lib/libprocstat/zfs \
+ lib/libutil \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libprocstat/common_kvm.h b/lib/libprocstat/common_kvm.h
index d0b5307..d5e08e1 100644
--- a/lib/libprocstat/common_kvm.h
+++ b/lib/libprocstat/common_kvm.h
@@ -41,9 +41,6 @@ int devfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
int isofs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
int msdosfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
int nfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
-int ntfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
-int nwfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
-int smbfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
int udf_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
int ufs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
int zfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c
index 167d91a..9d9c111 100644
--- a/lib/libprocstat/libprocstat.c
+++ b/lib/libprocstat/libprocstat.c
@@ -184,15 +184,18 @@ procstat_getprocs(struct procstat *procstat, int what, int arg,
struct kinfo_proc *p0, *p;
size_t len;
int name[4];
+ int cnt;
int error;
assert(procstat);
assert(count);
p = NULL;
if (procstat->type == PROCSTAT_KVM) {
- p0 = kvm_getprocs(procstat->kd, what, arg, count);
- if (p0 == NULL || count == 0)
+ *count = 0;
+ p0 = kvm_getprocs(procstat->kd, what, arg, &cnt);
+ if (p0 == NULL || cnt <= 0)
return (NULL);
+ *count = cnt;
len = *count * sizeof(*p);
p = malloc(len);
if (p == NULL) {
@@ -881,6 +884,8 @@ procstat_get_shm_info_kvm(kvm_t *kd, struct filestat *fst,
{
struct shmfd shmfd;
void *shmfdp;
+ char *path;
+ int i;
assert(kd);
assert(shm);
@@ -896,6 +901,21 @@ procstat_get_shm_info_kvm(kvm_t *kd, struct filestat *fst,
}
shm->mode = S_IFREG | shmfd.shm_mode;
shm->size = shmfd.shm_size;
+ if (fst->fs_path == NULL && shmfd.shm_path != NULL) {
+ path = malloc(MAXPATHLEN);
+ for (i = 0; i < MAXPATHLEN - 1; i++) {
+ if (!kvm_read_all(kd, (unsigned long)shmfd.shm_path + i,
+ path + i, 1))
+ break;
+ if (path[i] == '\0')
+ break;
+ }
+ path[i] = '\0';
+ if (i == 0)
+ free(path);
+ else
+ fst->fs_path = path;
+ }
return (0);
fail:
@@ -953,11 +973,6 @@ procstat_get_vnode_info_kvm(kvm_t *kd, struct filestat *fst,
FSTYPE(isofs),
FSTYPE(msdosfs),
FSTYPE(nfs),
- FSTYPE(ntfs),
-#ifdef LIBPROCSTAT_NWFS
- FSTYPE(nwfs),
-#endif
- FSTYPE(smbfs),
FSTYPE(udf),
FSTYPE(ufs),
#ifdef LIBPROCSTAT_ZFS
diff --git a/lib/libprocstat/libprocstat.h b/lib/libprocstat/libprocstat.h
index c00a179..662ea37 100644
--- a/lib/libprocstat/libprocstat.h
+++ b/lib/libprocstat/libprocstat.h
@@ -144,6 +144,7 @@ struct sockstat {
STAILQ_HEAD(filestat_list, filestat);
+__BEGIN_DECLS
void procstat_close(struct procstat *procstat);
void procstat_freeprocs(struct procstat *procstat, struct kinfo_proc *p);
void procstat_freefiles(struct procstat *procstat,
@@ -164,5 +165,6 @@ int procstat_get_vnode_info(struct procstat *procstat, struct filestat *fst,
struct vnstat *vn, char *errbuf);
struct procstat *procstat_open_sysctl(void);
struct procstat *procstat_open_kvm(const char *nlistf, const char *memf);
+__END_DECLS
#endif /* !_LIBPROCSTAT_H_ */
diff --git a/lib/libprocstat/zfs/Makefile.depend b/lib/libprocstat/zfs/Makefile.depend
new file mode 100644
index 0000000..cbc3887
--- /dev/null
+++ b/lib/libprocstat/zfs/Makefile.depend
@@ -0,0 +1,18 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libkvm \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libradius/Makefile.depend b/lib/libradius/Makefile.depend
new file mode 100644
index 0000000..e54ec8c
--- /dev/null
+++ b/lib/libradius/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/librpcsec_gss/Makefile.depend b/lib/librpcsec_gss/Makefile.depend
new file mode 100644
index 0000000..5324dbc
--- /dev/null
+++ b/lib/librpcsec_gss/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/rpc \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/librpcsec_gss/rpc_gss_get_error.3 b/lib/librpcsec_gss/rpc_gss_get_error.3
index 3b025d7..f1d8fc7 100644
--- a/lib/librpcsec_gss/rpc_gss_get_error.3
+++ b/lib/librpcsec_gss/rpc_gss_get_error.3
@@ -39,7 +39,7 @@
.Sh DESCRIPTION
Get details of the last RPCSEC_GSS error.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It error"
.It error
A pointer to a structure where the error details will be returned
.El
diff --git a/lib/librpcsec_gss/rpc_gss_get_mech_info.3 b/lib/librpcsec_gss/rpc_gss_get_mech_info.3
index d6abf4d..9a26dc1 100644
--- a/lib/librpcsec_gss/rpc_gss_get_mech_info.3
+++ b/lib/librpcsec_gss/rpc_gss_get_mech_info.3
@@ -40,7 +40,7 @@
This function looks up a mechanism by name by reading the file
/etc/gss/mech and queries it for its capabilities.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It service"
.It mech
The mechanism to search for
.It service
diff --git a/lib/librpcsec_gss/rpc_gss_get_principal_name.3 b/lib/librpcsec_gss/rpc_gss_get_principal_name.3
index 2eba5a9..50fc65b 100644
--- a/lib/librpcsec_gss/rpc_gss_get_principal_name.3
+++ b/lib/librpcsec_gss/rpc_gss_get_principal_name.3
@@ -46,7 +46,7 @@
This function can be used to generate a client principal name from
various strings.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It principal"
.It principal
If the principal is created successfully,
.Fa *principal
diff --git a/lib/librpcsec_gss/rpc_gss_get_versions.3 b/lib/librpcsec_gss/rpc_gss_get_versions.3
index 9192054..d624f85 100644
--- a/lib/librpcsec_gss/rpc_gss_get_versions.3
+++ b/lib/librpcsec_gss/rpc_gss_get_versions.3
@@ -39,7 +39,7 @@
.Sh DESCRIPTION
Return the highest and lowest supported versions of the RPCSEC_GSS protocol.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It vers_lo"
.It vers_hi
The value of
.Fa *vers_hi
diff --git a/lib/librpcsec_gss/rpc_gss_getcred.3 b/lib/librpcsec_gss/rpc_gss_getcred.3
index 72a6384..4ebd275 100644
--- a/lib/librpcsec_gss/rpc_gss_getcred.3
+++ b/lib/librpcsec_gss/rpc_gss_getcred.3
@@ -45,7 +45,7 @@
This function returns the RPCSEC_GSS authenticated credentials
associated with an RPC request.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It cookie"
.It req
The RPC request to query
.It rcred
diff --git a/lib/librpcsec_gss/rpc_gss_is_installed.3 b/lib/librpcsec_gss/rpc_gss_is_installed.3
index f0e03d8..d427e87 100644
--- a/lib/librpcsec_gss/rpc_gss_is_installed.3
+++ b/lib/librpcsec_gss/rpc_gss_is_installed.3
@@ -40,7 +40,7 @@
This function looks up a mechanism by name by reading the file
/etc/gss/mech.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It mech"
.It mech
The mechanism to search for
.El
diff --git a/lib/librpcsec_gss/rpc_gss_max_data_length.3 b/lib/librpcsec_gss/rpc_gss_max_data_length.3
index 67029a0..1d3a922 100644
--- a/lib/librpcsec_gss/rpc_gss_max_data_length.3
+++ b/lib/librpcsec_gss/rpc_gss_max_data_length.3
@@ -41,7 +41,7 @@ Calculate the maximum message size that will fit into a packet of size
.Fa max_tp_unit_len ,
given the current service and QoP setting.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It max_tp_unit_len"
.It auth
A handle to a RPCSEC_GSS security context
.It max_tp_unit_len
diff --git a/lib/librpcsec_gss/rpc_gss_mech_to_oid.3 b/lib/librpcsec_gss/rpc_gss_mech_to_oid.3
index 3449d0e..14bd5ee 100644
--- a/lib/librpcsec_gss/rpc_gss_mech_to_oid.3
+++ b/lib/librpcsec_gss/rpc_gss_mech_to_oid.3
@@ -40,7 +40,7 @@
This function looks up a mechanism by name by reading the file
/etc/gss/mech.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It oid_ret"
.It mech
The mechanism name to search for
.It oid_ret
diff --git a/lib/librpcsec_gss/rpc_gss_oid_to_mech.3 b/lib/librpcsec_gss/rpc_gss_oid_to_mech.3
index af2e7d0..661bdff 100644
--- a/lib/librpcsec_gss/rpc_gss_oid_to_mech.3
+++ b/lib/librpcsec_gss/rpc_gss_oid_to_mech.3
@@ -40,7 +40,7 @@
This function looks up a mechanism by oid by reading the file
/etc/gss/mech.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It mech_ret"
.It oid
The mechanism oid to search for
.It mech_ret
diff --git a/lib/librpcsec_gss/rpc_gss_qop_to_num.3 b/lib/librpcsec_gss/rpc_gss_qop_to_num.3
index 6f52b7b..0f95d27 100644
--- a/lib/librpcsec_gss/rpc_gss_qop_to_num.3
+++ b/lib/librpcsec_gss/rpc_gss_qop_to_num.3
@@ -40,7 +40,7 @@
This function looks up a quality of protection by name by reading the file
/etc/gss/qop.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It number_ret"
.It qop
The quality of protection to search for
.It mech
diff --git a/lib/librpcsec_gss/rpc_gss_seccreate.3 b/lib/librpcsec_gss/rpc_gss_seccreate.3
index 63978a5..836df23 100644
--- a/lib/librpcsec_gss/rpc_gss_seccreate.3
+++ b/lib/librpcsec_gss/rpc_gss_seccreate.3
@@ -48,7 +48,7 @@
This function is used to establish a security context between an
application and a remote peer using the RPSEC_GSS protocol.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width "options_req"
.It clnt
An RPC handle which is connected to the remote peer
.It principal
@@ -62,7 +62,7 @@ The value of mechanism should be the name of one of the security
mechanisms listed in /etc/gss/mech.
.It service
Type of service requested.
-.Bl -tag
+.Bl -tag -width "rpc_gss_svc_integrity"
.It rpc_gss_svc_default
The default - typically the same as
.Dv rpc_gss_svc_none .
diff --git a/lib/librpcsec_gss/rpc_gss_set_callback.3 b/lib/librpcsec_gss/rpc_gss_set_callback.3
index eb90227..4226285 100644
--- a/lib/librpcsec_gss/rpc_gss_set_callback.3
+++ b/lib/librpcsec_gss/rpc_gss_set_callback.3
@@ -62,7 +62,7 @@ protection used by the context.
If a context is locked, any subsequent requests which use different
values for service and quality of protection will be rejected.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It gss_context"
.It cb
A structure containing the RPC program and version for this callback
and a function which will be called when new contexts are created for
diff --git a/lib/librpcsec_gss/rpc_gss_set_defaults.3 b/lib/librpcsec_gss/rpc_gss_set_defaults.3
index e9b062d..72f2214 100644
--- a/lib/librpcsec_gss/rpc_gss_set_defaults.3
+++ b/lib/librpcsec_gss/rpc_gss_set_defaults.3
@@ -45,7 +45,7 @@ Set the service and quality of protection to be used for RPC requests.
The new values apply for the rest of the lifetime of the context
(unless changed again with this function).
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It service"
.It service
The service type to use for subsequent RPC requests
.It qop
diff --git a/lib/librpcsec_gss/rpc_gss_set_svc_name.3 b/lib/librpcsec_gss/rpc_gss_set_svc_name.3
index b63d38b..a06d7d3 100644
--- a/lib/librpcsec_gss/rpc_gss_set_svc_name.3
+++ b/lib/librpcsec_gss/rpc_gss_set_svc_name.3
@@ -47,7 +47,7 @@ This function registers a service principal which will be used to
authenticate RPCSEC_GSS security contexts for a given RPC program and
version.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It mechanism"
.It principal
A string representing the service principal in the form
.Qq service@hostname
diff --git a/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3 b/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3
index fdf24a6..f466e10 100644
--- a/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3
+++ b/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3
@@ -41,7 +41,7 @@ Calculate the maximum message size that will fit into a packet of size
.Fa max_tp_unit_len ,
given the current service and QoP setting.
.Sh PARAMETERS
-.Bl -tag
+.Bl -tag -width ".It max_tp_unit_len"
.It req
An RPC request
.It max_tp_unit_len
diff --git a/lib/librpcsec_gss/svc_rpcsec_gss.c b/lib/librpcsec_gss/svc_rpcsec_gss.c
index d0599be..e110a5f 100644
--- a/lib/librpcsec_gss/svc_rpcsec_gss.c
+++ b/lib/librpcsec_gss/svc_rpcsec_gss.c
@@ -140,8 +140,8 @@ TAILQ_HEAD(svc_rpc_gss_client_list, svc_rpc_gss_client);
#define CLIENT_HASH_SIZE 256
#define CLIENT_MAX 128
-struct svc_rpc_gss_client_list svc_rpc_gss_client_hash[CLIENT_HASH_SIZE];
-struct svc_rpc_gss_client_list svc_rpc_gss_clients;
+static struct svc_rpc_gss_client_list svc_rpc_gss_client_hash[CLIENT_HASH_SIZE];
+static struct svc_rpc_gss_client_list svc_rpc_gss_clients;
static size_t svc_rpc_gss_client_count;
static uint32_t svc_rpc_gss_next_clientid = 1;
diff --git a/lib/librpcsvc/Makefile.depend b/lib/librpcsvc/Makefile.depend
new file mode 100644
index 0000000..c753690
--- /dev/null
+++ b/lib/librpcsvc/Makefile.depend
@@ -0,0 +1,60 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/rpc \
+ include/rpcsvc \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+klm_prot_xdr.So: klm_prot_xdr.c
+klm_prot_xdr.o: klm_prot_xdr.c
+klm_prot_xdr.po: klm_prot_xdr.c
+mount_xdr.So: mount_xdr.c
+mount_xdr.o: mount_xdr.c
+mount_xdr.po: mount_xdr.c
+nfs_prot_xdr.So: nfs_prot_xdr.c
+nfs_prot_xdr.o: nfs_prot_xdr.c
+nfs_prot_xdr.po: nfs_prot_xdr.c
+nlm_prot_xdr.So: nlm_prot_xdr.c
+nlm_prot_xdr.o: nlm_prot_xdr.c
+nlm_prot_xdr.po: nlm_prot_xdr.c
+rex_xdr.So: rex_xdr.c
+rex_xdr.o: rex_xdr.c
+rex_xdr.po: rex_xdr.c
+rnusers_xdr.So: rnusers_xdr.c
+rnusers_xdr.o: rnusers_xdr.c
+rnusers_xdr.po: rnusers_xdr.c
+rquota_xdr.So: rquota_xdr.c
+rquota_xdr.o: rquota_xdr.c
+rquota_xdr.po: rquota_xdr.c
+rstat_xdr.So: rstat_xdr.c
+rstat_xdr.o: rstat_xdr.c
+rstat_xdr.po: rstat_xdr.c
+rwall_xdr.So: rwall_xdr.c
+rwall_xdr.o: rwall_xdr.c
+rwall_xdr.po: rwall_xdr.c
+sm_inter_xdr.So: sm_inter_xdr.c
+sm_inter_xdr.o: sm_inter_xdr.c
+sm_inter_xdr.po: sm_inter_xdr.c
+spray_xdr.So: spray_xdr.c
+spray_xdr.o: spray_xdr.c
+spray_xdr.po: spray_xdr.c
+yppasswd_xdr.So: yppasswd_xdr.c
+yppasswd_xdr.o: yppasswd_xdr.c
+yppasswd_xdr.po: yppasswd_xdr.c
+ypupdate_prot_xdr.So: ypupdate_prot_xdr.c
+ypupdate_prot_xdr.o: ypupdate_prot_xdr.c
+ypupdate_prot_xdr.po: ypupdate_prot_xdr.c
+ypxfrd_xdr.So: ypxfrd_xdr.c
+ypxfrd_xdr.o: ypxfrd_xdr.c
+ypxfrd_xdr.po: ypxfrd_xdr.c
+.endif
diff --git a/lib/librt/Makefile.depend b/lib/librt/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/librt/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/librtld_db/Makefile.depend b/lib/librtld_db/Makefile.depend
new file mode 100644
index 0000000..29fda55
--- /dev/null
+++ b/lib/librtld_db/Makefile.depend
@@ -0,0 +1,14 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libsbuf/Makefile.depend b/lib/libsbuf/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libsbuf/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libsdp/Makefile.depend b/lib/libsdp/Makefile.depend
new file mode 100644
index 0000000..47939e0
--- /dev/null
+++ b/lib/libsdp/Makefile.depend
@@ -0,0 +1,18 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+ lib/libbluetooth \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libsm/Makefile.depend b/lib/libsm/Makefile.depend
new file mode 100644
index 0000000..6a23591
--- /dev/null
+++ b/lib/libsm/Makefile.depend
@@ -0,0 +1,155 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libutil \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+assert.o: sm_os.h
+assert.po: sm_os.h
+cf.o: sm_os.h
+cf.po: sm_os.h
+clock.o: sm_os.h
+clock.po: sm_os.h
+clrerr.o: sm_os.h
+clrerr.po: sm_os.h
+config.o: sm_os.h
+config.po: sm_os.h
+debug.o: sm_os.h
+debug.po: sm_os.h
+errstring.o: sm_os.h
+errstring.po: sm_os.h
+exc.o: sm_os.h
+exc.po: sm_os.h
+fclose.o: sm_os.h
+fclose.po: sm_os.h
+feof.o: sm_os.h
+feof.po: sm_os.h
+ferror.o: sm_os.h
+ferror.po: sm_os.h
+fflush.o: sm_os.h
+fflush.po: sm_os.h
+fget.o: sm_os.h
+fget.po: sm_os.h
+findfp.o: sm_os.h
+findfp.po: sm_os.h
+flags.o: sm_os.h
+flags.po: sm_os.h
+fopen.o: sm_os.h
+fopen.po: sm_os.h
+fpos.o: sm_os.h
+fpos.po: sm_os.h
+fprintf.o: sm_os.h
+fprintf.po: sm_os.h
+fpurge.o: sm_os.h
+fpurge.po: sm_os.h
+fput.o: sm_os.h
+fput.po: sm_os.h
+fread.o: sm_os.h
+fread.po: sm_os.h
+fscanf.o: sm_os.h
+fscanf.po: sm_os.h
+fseek.o: sm_os.h
+fseek.po: sm_os.h
+fvwrite.o: sm_os.h
+fvwrite.po: sm_os.h
+fwalk.o: sm_os.h
+fwalk.po: sm_os.h
+fwrite.o: sm_os.h
+fwrite.po: sm_os.h
+get.o: sm_os.h
+get.po: sm_os.h
+heap.o: sm_os.h
+heap.po: sm_os.h
+ldap.o: sm_os.h
+ldap.po: sm_os.h
+makebuf.o: sm_os.h
+makebuf.po: sm_os.h
+match.o: sm_os.h
+match.po: sm_os.h
+mbdb.o: sm_os.h
+mbdb.po: sm_os.h
+memstat.o: sm_os.h
+memstat.po: sm_os.h
+mpeix.o: sm_os.h
+mpeix.po: sm_os.h
+niprop.o: sm_os.h
+niprop.po: sm_os.h
+path.o: sm_os.h
+path.po: sm_os.h
+put.o: sm_os.h
+put.po: sm_os.h
+refill.o: sm_os.h
+refill.po: sm_os.h
+rewind.o: sm_os.h
+rewind.po: sm_os.h
+rpool.o: sm_os.h
+rpool.po: sm_os.h
+sem.o: sm_os.h
+sem.po: sm_os.h
+setvbuf.o: sm_os.h
+setvbuf.po: sm_os.h
+shm.o: sm_os.h
+shm.po: sm_os.h
+signal.o: sm_os.h
+signal.po: sm_os.h
+smstdio.o: sm_os.h
+smstdio.po: sm_os.h
+snprintf.o: sm_os.h
+snprintf.po: sm_os.h
+sscanf.o: sm_os.h
+sscanf.po: sm_os.h
+stdio.o: sm_os.h
+stdio.po: sm_os.h
+strcasecmp.o: sm_os.h
+strcasecmp.po: sm_os.h
+strdup.o: sm_os.h
+strdup.po: sm_os.h
+strerror.o: sm_os.h
+strerror.po: sm_os.h
+strexit.o: sm_os.h
+strexit.po: sm_os.h
+string.o: sm_os.h
+string.po: sm_os.h
+stringf.o: sm_os.h
+stringf.po: sm_os.h
+strio.o: sm_os.h
+strio.po: sm_os.h
+strl.o: sm_os.h
+strl.po: sm_os.h
+strrevcmp.o: sm_os.h
+strrevcmp.po: sm_os.h
+strto.o: sm_os.h
+strto.po: sm_os.h
+test.o: sm_os.h
+test.po: sm_os.h
+ungetc.o: sm_os.h
+ungetc.po: sm_os.h
+util.o: sm_os.h
+util.po: sm_os.h
+vasprintf.o: sm_os.h
+vasprintf.po: sm_os.h
+vfprintf.o: sm_os.h
+vfprintf.po: sm_os.h
+vfscanf.o: sm_os.h
+vfscanf.po: sm_os.h
+vprintf.o: sm_os.h
+vprintf.po: sm_os.h
+vsnprintf.o: sm_os.h
+vsnprintf.po: sm_os.h
+wbuf.o: sm_os.h
+wbuf.po: sm_os.h
+wsetup.o: sm_os.h
+wsetup.po: sm_os.h
+xtrap.o: sm_os.h
+xtrap.po: sm_os.h
+.endif
diff --git a/lib/libsmb/Makefile.depend b/lib/libsmb/Makefile.depend
new file mode 100644
index 0000000..29fda55
--- /dev/null
+++ b/lib/libsmb/Makefile.depend
@@ -0,0 +1,14 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libsmdb/Makefile.depend b/lib/libsmdb/Makefile.depend
new file mode 100644
index 0000000..b8a2618
--- /dev/null
+++ b/lib/libsmdb/Makefile.depend
@@ -0,0 +1,25 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libutil \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+smdb.o: sm_os.h
+smdb.po: sm_os.h
+smdb1.o: sm_os.h
+smdb1.po: sm_os.h
+smdb2.o: sm_os.h
+smdb2.po: sm_os.h
+smndbm.o: sm_os.h
+smndbm.po: sm_os.h
+.endif
diff --git a/lib/libsmutil/Makefile.depend b/lib/libsmutil/Makefile.depend
new file mode 100644
index 0000000..dac33d9
--- /dev/null
+++ b/lib/libsmutil/Makefile.depend
@@ -0,0 +1,30 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+ lib/libutil \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+cf.o: sm_os.h
+cf.po: sm_os.h
+debug.o: sm_os.h
+debug.po: sm_os.h
+err.o: sm_os.h
+err.po: sm_os.h
+lockfile.o: sm_os.h
+lockfile.po: sm_os.h
+safefile.o: sm_os.h
+safefile.po: sm_os.h
+snprintf.o: sm_os.h
+snprintf.po: sm_os.h
+.endif
diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile
index 0ad8fa5..fd720a9 100644
--- a/lib/libstand/Makefile
+++ b/lib/libstand/Makefile
@@ -38,7 +38,7 @@ CFLAGS+= -msoft-float -D_STANDALONE
.endif
# standalone components and stuff we have modified locally
-SRCS+= zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \
+SRCS+= gzguts.h zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \
globals.c pager.c printf.c strdup.c strerror.c strtol.c random.c \
sbrk.c twiddle.c zalloc.c zalloc_malloc.c
@@ -118,23 +118,29 @@ libstand_bzlib_private.h: bzlib_private.h
# decompression functionality from libz
.PATH: ${.CURDIR}/../libz
CFLAGS+=-DHAVE_MEMCPY -I${.CURDIR}/../libz
-SRCS+= adler32.c crc32.c libstand_zutil.h
+SRCS+= adler32.c crc32.c libstand_zutil.h libstand_gzguts.h
.for file in infback.c inffast.c inflate.c inftrees.c zutil.c
SRCS+= _${file}
CLEANFILES+= _${file}
_${file}: ${file}
- sed "s|zutil\.h|libstand_zutil.h|" ${.ALLSRC} > ${.TARGET}
+ sed -e "s|zutil\.h|libstand_zutil.h|" \
+ -e "s|gzguts\.h|libstand_gzguts.h|" \
+ ${.ALLSRC} > ${.TARGET}
.endfor
# depend on stand.h being able to be included multiple times
-CLEANFILES+= libstand_zutil.h
-libstand_zutil.h: zutil.h
- sed -e 's|<stddef.h>|"stand.h"|' \
+.for file in zutil.h gzguts.h
+CLEANFILES+= libstand_${file}
+libstand_${file}: ${file}
+ sed -e 's|<fcntl.h>|"stand.h"|' \
+ -e 's|<stddef.h>|"stand.h"|' \
-e 's|<string.h>|"stand.h"|' \
+ -e 's|<stdio.h>|"stand.h"|' \
-e 's|<stdlib.h>|"stand.h"|' \
${.ALLSRC} > ${.TARGET}
+.endfor
# io routines
SRCS+= closeall.c dev.c ioctl.c nullfs.c stat.c \
diff --git a/lib/libstand/Makefile.depend b/lib/libstand/Makefile.depend
new file mode 100644
index 0000000..cac12de
--- /dev/null
+++ b/lib/libstand/Makefile.depend
@@ -0,0 +1,58 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+ lib/libbz2 \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+_bzlib.o: _bzlib.c
+_bzlib.o: libstand_bzlib_private.h
+_bzlib.po: _bzlib.c
+_bzlib.po: libstand_bzlib_private.h
+_crctable.o: _crctable.c
+_crctable.o: libstand_bzlib_private.h
+_crctable.po: _crctable.c
+_crctable.po: libstand_bzlib_private.h
+_decompress.o: _decompress.c
+_decompress.o: libstand_bzlib_private.h
+_decompress.po: _decompress.c
+_decompress.po: libstand_bzlib_private.h
+_huffman.o: _huffman.c
+_huffman.o: libstand_bzlib_private.h
+_huffman.po: _huffman.c
+_huffman.po: libstand_bzlib_private.h
+_infback.o: _infback.c
+_infback.o: libstand_zutil.h
+_infback.po: _infback.c
+_infback.po: libstand_zutil.h
+_inffast.o: _inffast.c
+_inffast.o: libstand_zutil.h
+_inffast.po: _inffast.c
+_inffast.po: libstand_zutil.h
+_inflate.o: _inflate.c
+_inflate.o: libstand_zutil.h
+_inflate.po: _inflate.c
+_inflate.po: libstand_zutil.h
+_inftrees.o: _inftrees.c
+_inftrees.o: libstand_zutil.h
+_inftrees.po: _inftrees.c
+_inftrees.po: libstand_zutil.h
+_randtable.o: _randtable.c
+_randtable.o: libstand_bzlib_private.h
+_randtable.po: _randtable.c
+_randtable.po: libstand_bzlib_private.h
+_zutil.o: _zutil.c
+_zutil.o: libstand_zutil.h
+_zutil.po: _zutil.c
+_zutil.po: libstand_zutil.h
+.endif
diff --git a/lib/libstand/nandfs.c b/lib/libstand/nandfs.c
index 67e2fea..d5fcb9d 100644
--- a/lib/libstand/nandfs.c
+++ b/lib/libstand/nandfs.c
@@ -175,7 +175,7 @@ static int
nandfs_find_super_block(struct nandfs *fs, struct open_file *f)
{
struct nandfs_super_block *sb;
- int i, j, n;
+ int i, j, n, s;
int sectors_to_read, error;
sb = malloc(fs->nf_sectorsize);
@@ -196,23 +196,22 @@ nandfs_find_super_block(struct nandfs *fs, struct open_file *f)
continue;
}
n = fs->nf_sectorsize / sizeof(struct nandfs_super_block);
+ s = 0;
if ((i * fs->nf_sectorsize) % fs->nf_fsdata->f_erasesize == 0) {
if (fs->nf_sectorsize == sizeof(struct nandfs_fsdata))
continue;
else {
- sb += (sizeof(struct nandfs_fsdata) /
- sizeof(struct nandfs_super_block));
- n -= (sizeof(struct nandfs_fsdata) /
+ s += (sizeof(struct nandfs_fsdata) /
sizeof(struct nandfs_super_block));
}
}
- for (j = 0; j < n; j++) {
+ for (j = s; j < n; j++) {
if (!nandfs_check_superblock_crc(fs->nf_fsdata, &sb[j]))
continue;
- NANDFS_DEBUG("magic %x wtime %jd\n", sb->s_magic,
- sb->s_wtime);
- if (sb[j].s_wtime > fs->nf_sb->s_wtime)
+ NANDFS_DEBUG("magic %x wtime %jd, lastcp 0x%jx\n",
+ sb[j].s_magic, sb[j].s_wtime, sb[j].s_last_cno);
+ if (sb[j].s_last_cno > fs->nf_sb->s_last_cno)
memcpy(fs->nf_sb, &sb[j], sizeof(*fs->nf_sb));
}
}
diff --git a/lib/libstand/nfs.c b/lib/libstand/nfs.c
index e49999d..a7a7ccb 100644
--- a/lib/libstand/nfs.c
+++ b/lib/libstand/nfs.c
@@ -181,6 +181,7 @@ struct nfs_iodesc {
uint32_t fhsize;
u_char fh[NFS_V3MAXFHSIZE];
struct nfsv3_fattrs fa; /* all in network order */
+ uint64_t cookie;
};
#endif /* OLD_NFSV2 */
@@ -486,6 +487,9 @@ nfs_open(const char *upath, struct open_file *f)
desc->destip = rootip;
if ((error = nfs_getrootfh(desc, rootpath, nfs_root_node.fh)))
return (error);
+ nfs_root_node.fa.fa_type = htonl(NFDIR);
+ nfs_root_node.fa.fa_mode = htonl(0755);
+ nfs_root_node.fa.fa_nlink = htonl(2);
nfs_root_node.iodesc = desc;
fh = &nfs_root_node.fh[0];
@@ -498,14 +502,15 @@ nfs_open(const char *upath, struct open_file *f)
setenv("boot.nfsroot.path", rootpath, 1);
setenv("boot.nfsroot.nfshandle", buf, 1);
-#ifndef NFS_NOSYMLINK
- /* Fake up attributes for the root dir. */
- fa = &nfs_root_node.fa;
- fa->fa_type = htonl(NFDIR);
- fa->fa_mode = htonl(0755);
- fa->fa_nlink = htonl(2);
+ /* Allocate file system specific data structure */
+ currfd = malloc(sizeof(*newfd));
+ if (currfd == NULL) {
+ error = ENOMEM;
+ goto out;
+ }
- currfd = &nfs_root_node;
+#ifndef NFS_NOSYMLINK
+ bcopy(&nfs_root_node, currfd, sizeof(*currfd));
newfd = 0;
cp = path = strdup(upath);
@@ -533,7 +538,6 @@ nfs_open(const char *upath, struct open_file *f)
/* allocate file system specific data structure */
newfd = malloc(sizeof(*newfd));
newfd->iodesc = currfd->iodesc;
- newfd->off = 0;
/*
* Get next component of path name.
@@ -585,11 +589,8 @@ nfs_open(const char *upath, struct open_file *f)
* If relative pathname, restart at parent directory.
*/
cp = namebuf;
- if (*cp == '/') {
- if (currfd != &nfs_root_node)
- free(currfd);
- currfd = &nfs_root_node;
- }
+ if (*cp == '/')
+ bcopy(&nfs_root_node, currfd, sizeof(*currfd));
free(newfd);
newfd = 0;
@@ -597,8 +598,7 @@ nfs_open(const char *upath, struct open_file *f)
continue;
}
- if (currfd != &nfs_root_node)
- free(currfd);
+ free(currfd);
currfd = newfd;
newfd = 0;
}
@@ -606,19 +606,15 @@ nfs_open(const char *upath, struct open_file *f)
error = 0;
out:
- if (newfd)
- free(newfd);
- if (path)
- free(path);
+ free(newfd);
+ free(path);
#else
- /* allocate file system specific data structure */
- currfd = malloc(sizeof(*currfd));
currfd->iodesc = desc;
- currfd->off = 0;
error = nfs_lookupfh(&nfs_root_node, upath, currfd);
#endif
if (!error) {
+ currfd->off = 0;
f->f_fsdata = (void *)currfd;
return (0);
}
@@ -628,10 +624,7 @@ out:
printf("nfs_open: %s lookupfh failed: %s\n",
path, strerror(error));
#endif
-#ifndef NFS_NOSYMLINK
- if (currfd != &nfs_root_node)
-#endif
- free(currfd);
+ free(currfd);
return (error);
}
@@ -646,7 +639,7 @@ nfs_close(struct open_file *f)
printf("nfs_close: fp=0x%lx\n", (u_long)fp);
#endif
- if (fp != &nfs_root_node && fp)
+ if (fp)
free(fp);
f->f_fsdata = (void *)0;
@@ -761,6 +754,7 @@ nfs_readdir(struct open_file *f, struct dirent *d)
struct nfs_readdir_data *rd;
struct nfs_readdir_off *roff = NULL;
static char *buf;
+ static struct nfs_iodesc *pfp = NULL;
static n_long cookie = 0;
size_t cc;
n_long eof;
@@ -774,13 +768,14 @@ nfs_readdir(struct open_file *f, struct dirent *d)
u_char d[NFS_READDIRSIZE];
} rdata;
- if (cookie == 0) {
+ if (fp != pfp || fp->off != cookie) {
+ pfp = NULL;
refill:
args = &sdata.d;
bzero(args, sizeof(*args));
bcopy(fp->fh, args->fh, NFS_FHSIZE);
- args->cookie = htonl(cookie);
+ args->cookie = htonl(fp->off);
args->count = htonl(NFS_READDIRSIZE);
cc = rpc_call(fp->iodesc, NFS_PROG, NFS_VER2, NFSPROC_READDIR,
@@ -790,6 +785,8 @@ nfs_readdir(struct open_file *f, struct dirent *d)
roff = (struct nfs_readdir_off *)buf;
if (ntohl(roff->cookie) != 0)
return EIO;
+ pfp = fp;
+ cookie = fp->off;
}
roff = (struct nfs_readdir_off *)buf;
@@ -810,7 +807,7 @@ nfs_readdir(struct open_file *f, struct dirent *d)
buf += (sizeof(struct nfs_readdir_data) + roundup(htonl(rd->len),4));
roff = (struct nfs_readdir_off *)buf;
- cookie = ntohl(roff->cookie);
+ fp->off = cookie = ntohl(roff->cookie);
return 0;
}
#else /* !OLD_NFSV2 */
@@ -1133,6 +1130,9 @@ nfs_open(const char *upath, struct open_file *f)
if ((error = nfs_getrootfh(desc, rootpath, &nfs_root_node.fhsize,
nfs_root_node.fh)))
return (error);
+ nfs_root_node.fa.fa_type = htonl(NFDIR);
+ nfs_root_node.fa.fa_mode = htonl(0755);
+ nfs_root_node.fa.fa_nlink = htonl(2);
nfs_root_node.iodesc = desc;
fh = &nfs_root_node.fh[0];
@@ -1147,14 +1147,14 @@ nfs_open(const char *upath, struct open_file *f)
sprintf(buf, "%d", nfs_root_node.fhsize);
setenv("boot.nfsroot.nfshandlelen", buf, 1);
+ /* Allocate file system specific data structure */
+ currfd = malloc(sizeof(*newfd));
+ if (currfd == NULL) {
+ error = ENOMEM;
+ goto out;
+ }
#ifndef NFS_NOSYMLINK
- /* Fake up attributes for the root dir. */
- fa = &nfs_root_node.fa;
- fa->fa_type = htonl(NFDIR);
- fa->fa_mode = htonl(0755);
- fa->fa_nlink = htonl(2);
-
- currfd = &nfs_root_node;
+ bcopy(&nfs_root_node, currfd, sizeof(*currfd));
newfd = 0;
cp = path = strdup(upath);
@@ -1186,7 +1186,6 @@ nfs_open(const char *upath, struct open_file *f)
goto out;
}
newfd->iodesc = currfd->iodesc;
- newfd->off = 0;
/*
* Get next component of path name.
@@ -1238,11 +1237,8 @@ nfs_open(const char *upath, struct open_file *f)
* If relative pathname, restart at parent directory.
*/
cp = namebuf;
- if (*cp == '/') {
- if (currfd != &nfs_root_node)
- free(currfd);
- currfd = &nfs_root_node;
- }
+ if (*cp == '/')
+ bcopy(&nfs_root_node, currfd, sizeof(*currfd));
free(newfd);
newfd = 0;
@@ -1250,8 +1246,7 @@ nfs_open(const char *upath, struct open_file *f)
continue;
}
- if (currfd != &nfs_root_node)
- free(currfd);
+ free(currfd);
currfd = newfd;
newfd = 0;
}
@@ -1262,17 +1257,13 @@ out:
free(newfd);
free(path);
#else
- /* allocate file system specific data structure */
- currfd = malloc(sizeof(*currfd));
- if (currfd != NULL) {
- currfd->iodesc = desc;
- currfd->off = 0;
+ currfd->iodesc = desc;
- error = nfs_lookupfh(&nfs_root_node, upath, currfd);
- } else
- error = ENOMEM;
+ error = nfs_lookupfh(&nfs_root_node, upath, currfd);
#endif
if (!error) {
+ currfd->off = 0;
+ currfd->cookie = 0;
f->f_fsdata = (void *)currfd;
return (0);
}
@@ -1282,10 +1273,7 @@ out:
printf("nfs_open: %s lookupfh failed: %s\n",
path, strerror(error));
#endif
-#ifndef NFS_NOSYMLINK
- if (currfd != &nfs_root_node)
-#endif
- free(currfd);
+ free(currfd);
return (error);
}
@@ -1300,7 +1288,7 @@ nfs_close(struct open_file *f)
printf("nfs_close: fp=0x%lx\n", (u_long)fp);
#endif
- if (fp != &nfs_root_node && fp)
+ if (fp)
free(fp);
f->f_fsdata = (void *)0;
@@ -1414,11 +1402,9 @@ nfs_readdir(struct open_file *f, struct dirent *d)
struct nfsv3_readdir_repl *repl;
struct nfsv3_readdir_entry *rent;
static char *buf;
- static uint32_t cookie0 = 0;
- static uint32_t cookie1 = 0;
+ static struct nfs_iodesc *pfp = NULL;
+ static uint64_t cookie = 0;
size_t cc;
- static uint32_t cookieverf0 = 0;
- static uint32_t cookieverf1 = 0;
int pos;
struct args {
@@ -1434,7 +1420,8 @@ nfs_readdir(struct open_file *f, struct dirent *d)
u_char d[NFS_READDIRSIZE];
} rdata;
- if (cookie0 == 0 && cookie1 == 0) {
+ if (fp != pfp || fp->off != cookie) {
+ pfp = NULL;
refill:
args = &sdata.d;
bzero(args, sizeof(*args));
@@ -1442,10 +1429,10 @@ nfs_readdir(struct open_file *f, struct dirent *d)
args->fhsize = htonl(fp->fhsize);
bcopy(fp->fh, args->fhpluscookie, fp->fhsize);
pos = roundup(fp->fhsize, sizeof(uint32_t)) / sizeof(uint32_t);
- args->fhpluscookie[pos++] = cookie0;
- args->fhpluscookie[pos++] = cookie1;
- args->fhpluscookie[pos++] = cookieverf0;
- args->fhpluscookie[pos++] = cookieverf1;
+ args->fhpluscookie[pos++] = htonl(fp->off >> 32);
+ args->fhpluscookie[pos++] = htonl(fp->off);
+ args->fhpluscookie[pos++] = htonl(fp->cookie >> 32);
+ args->fhpluscookie[pos++] = htonl(fp->cookie);
args->fhpluscookie[pos] = htonl(NFS_READDIRSIZE);
cc = rpc_call(fp->iodesc, NFS_PROG, NFS_VER3, NFSPROCV3_READDIR,
@@ -1456,8 +1443,10 @@ nfs_readdir(struct open_file *f, struct dirent *d)
repl = (struct nfsv3_readdir_repl *)buf;
if (repl->errno != 0)
return (ntohl(repl->errno));
- cookieverf0 = repl->cookiev0;
- cookieverf1 = repl->cookiev1;
+ pfp = fp;
+ cookie = fp->off;
+ fp->cookie = ((uint64_t)ntohl(repl->cookiev0) << 32) |
+ ntohl(repl->cookiev1);
buf += sizeof (struct nfsv3_readdir_repl);
}
rent = (struct nfsv3_readdir_entry *)buf;
@@ -1465,10 +1454,7 @@ nfs_readdir(struct open_file *f, struct dirent *d)
if (rent->follows == 0) {
/* fid0 is actually eof */
if (rent->fid0 != 0) {
- cookie0 = 0;
- cookie1 = 0;
- cookieverf0 = 0;
- cookieverf1 = 0;
+ cookie = 0;
return (ENOENT);
}
goto refill;
@@ -1479,8 +1465,8 @@ nfs_readdir(struct open_file *f, struct dirent *d)
d->d_name[d->d_namlen] = '\0';
pos = roundup(d->d_namlen, sizeof(uint32_t)) / sizeof(uint32_t);
- cookie0 = rent->nameplus[pos++];
- cookie1 = rent->nameplus[pos++];
+ fp->off = cookie = ((uint64_t)ntohl(rent->nameplus[pos++]) << 32) |
+ ntohl(rent->nameplus[pos++]);
buf = (u_char *)&rent->nameplus[pos];
return (0);
}
diff --git a/lib/libstdbuf/Makefile b/lib/libstdbuf/Makefile
index cf65e4f..ea233a8 100644
--- a/lib/libstdbuf/Makefile
+++ b/lib/libstdbuf/Makefile
@@ -7,6 +7,4 @@ SRCS= stdbuf.c
SHLIB_MAJOR= 1
MAN= libstdbuf.3
-WARNS?= 6
-
.include <bsd.lib.mk>
diff --git a/lib/libstdbuf/Makefile.depend b/lib/libstdbuf/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libstdbuf/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libstdthreads/Makefile.depend b/lib/libstdthreads/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libstdthreads/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libtacplus/Makefile.depend b/lib/libtacplus/Makefile.depend
new file mode 100644
index 0000000..22f59e0
--- /dev/null
+++ b/lib/libtacplus/Makefile.depend
@@ -0,0 +1,18 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+ lib/libmd \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libtelnet/Makefile.depend b/lib/libtelnet/Makefile.depend
new file mode 100644
index 0000000..9dc7971
--- /dev/null
+++ b/lib/libtelnet/Makefile.depend
@@ -0,0 +1,20 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ kerberos5/lib/libasn1 \
+ kerberos5/lib/libkrb5 \
+ lib/libmp \
+ lib/libpam/libpam \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libthr/Makefile.depend b/lib/libthr/Makefile.depend
new file mode 100644
index 0000000..ff699f7
--- /dev/null
+++ b/lib/libthr/Makefile.depend
@@ -0,0 +1,15 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libthr/arch/arm/include/pthread_md.h b/lib/libthr/arch/arm/include/pthread_md.h
index 83ddf7f..3c3dd6d 100644
--- a/lib/libthr/arch/arm/include/pthread_md.h
+++ b/lib/libthr/arch/arm/include/pthread_md.h
@@ -57,7 +57,11 @@ void _tcb_dtor(struct tcb *);
static __inline void
_tcb_set(struct tcb *tcb)
{
- *((struct tcb **)ARM_TP_ADDRESS) = tcb;
+#ifdef ARM_TP_ADDRESS
+ *((struct tcb **)ARM_TP_ADDRESS) = tcb; /* avoids a system call */
+#else
+ sysarch(ARM_SET_TP, tcb);
+#endif
}
/*
@@ -66,7 +70,15 @@ _tcb_set(struct tcb *tcb)
static __inline struct tcb *
_tcb_get(void)
{
+#ifdef ARM_TP_ADDRESS
return (*((struct tcb **)ARM_TP_ADDRESS));
+#else
+ struct tcb *tcb;
+
+ __asm __volatile("mrc p15, 0, %0, c13, c0, 3" \
+ : "=r" (tcb));
+ return (tcb);
+#endif
}
extern struct pthread *_thr_initial;
diff --git a/lib/libthr/thread/thr_cond.c b/lib/libthr/thread/thr_cond.c
index a834711..6af15db 100644
--- a/lib/libthr/thread/thr_cond.c
+++ b/lib/libthr/thread/thr_cond.c
@@ -217,6 +217,7 @@ cond_wait_user(struct pthread_cond *cvp, struct pthread_mutex *mp,
struct sleepqueue *sq;
int recurse;
int error;
+ int defered;
if (curthread->wchan != NULL)
PANIC("thread was already on queue.");
@@ -230,13 +231,24 @@ cond_wait_user(struct pthread_cond *cvp, struct pthread_mutex *mp,
* us to check it without locking in pthread_cond_signal().
*/
cvp->__has_user_waiters = 1;
- curthread->will_sleep = 1;
- (void)_mutex_cv_unlock(mp, &recurse);
+ defered = 0;
+ (void)_mutex_cv_unlock(mp, &recurse, &defered);
curthread->mutex_obj = mp;
_sleepq_add(cvp, curthread);
for(;;) {
_thr_clear_wake(curthread);
_sleepq_unlock(cvp);
+ if (defered) {
+ defered = 0;
+ if ((mp->m_lock.m_owner & UMUTEX_CONTESTED) == 0)
+ (void)_umtx_op_err(&mp->m_lock, UMTX_OP_MUTEX_WAKE2,
+ mp->m_lock.m_flags, 0, 0);
+ }
+ if (curthread->nwaiter_defer > 0) {
+ _thr_wake_all(curthread->defer_waiters,
+ curthread->nwaiter_defer);
+ curthread->nwaiter_defer = 0;
+ }
if (cancel) {
_thr_cancel_enter2(curthread, 0);
diff --git a/lib/libthr/thread/thr_fork.c b/lib/libthr/thread/thr_fork.c
index a1399bf..c26541e 100644
--- a/lib/libthr/thread/thr_fork.c
+++ b/lib/libthr/thread/thr_fork.c
@@ -200,9 +200,6 @@ _fork(void)
_rtld_atfork_post(rtld_locks);
_thr_setthreaded(0);
- /* reinitialize libc spinlocks. */
- _thr_spinlock_init();
-
/* reinitalize library. */
_libpthread_init(curthread);
diff --git a/lib/libthr/thread/thr_getcpuclockid.c b/lib/libthr/thread/thr_getcpuclockid.c
index 68f88d5..b4ec666 100644
--- a/lib/libthr/thread/thr_getcpuclockid.c
+++ b/lib/libthr/thread/thr_getcpuclockid.c
@@ -39,9 +39,11 @@ __weak_reference(_pthread_getcpuclockid, pthread_getcpuclockid);
int
_pthread_getcpuclockid(pthread_t pthread, clockid_t *clock_id)
{
+
if (pthread == NULL)
return (EINVAL);
- *clock_id = CLOCK_THREAD_CPUTIME_ID;
+ if (clock_getcpuclockid2(TID(pthread), CPUCLOCK_WHICH_TID, clock_id))
+ return (errno);
return (0);
}
diff --git a/lib/libthr/thread/thr_getschedparam.c b/lib/libthr/thread/thr_getschedparam.c
index b36d724..ff6c3ab 100644
--- a/lib/libthr/thread/thr_getschedparam.c
+++ b/lib/libthr/thread/thr_getschedparam.c
@@ -48,30 +48,21 @@ _pthread_getschedparam(pthread_t pthread, int *policy,
struct sched_param *param)
{
struct pthread *curthread = _get_curthread();
- int ret;
+ int ret = 0;
if (policy == NULL || param == NULL)
return (EINVAL);
- if (pthread == curthread) {
- /*
- * Avoid searching the thread list when it is the current
- * thread.
- */
+ /*
+ * Avoid searching the thread list when it is the current
+ * thread.
+ */
+ if (pthread == curthread)
THR_LOCK(curthread);
- *policy = curthread->attr.sched_policy;
- param->sched_priority = curthread->attr.prio;
- THR_UNLOCK(curthread);
- ret = 0;
- }
- /* Find the thread in the list of active threads. */
- else if ((ret = _thr_ref_add(curthread, pthread, /*include dead*/0))
- == 0) {
- THR_THREAD_LOCK(curthread, pthread);
- *policy = pthread->attr.sched_policy;
- param->sched_priority = pthread->attr.prio;
- THR_THREAD_UNLOCK(curthread, pthread);
- _thr_ref_delete(curthread, pthread);
- }
+ else if ((ret = _thr_find_thread(curthread, pthread, /*include dead*/0)))
+ return (ret);
+ *policy = pthread->attr.sched_policy;
+ param->sched_priority = pthread->attr.prio;
+ THR_THREAD_UNLOCK(curthread, pthread);
return (ret);
}
diff --git a/lib/libthr/thread/thr_info.c b/lib/libthr/thread/thr_info.c
index 2da6da2..350c848 100644
--- a/lib/libthr/thread/thr_info.c
+++ b/lib/libthr/thread/thr_info.c
@@ -51,16 +51,12 @@ _pthread_set_name_np(pthread_t thread, const char *name)
if (thr_set_name(thread->tid, name))
ret = errno;
} else {
- if (_thr_ref_add(curthread, thread, 0) == 0) {
- THR_THREAD_LOCK(curthread, thread);
+ if ((ret=_thr_find_thread(curthread, thread, 0)) == 0) {
if (thread->state != PS_DEAD) {
if (thr_set_name(thread->tid, name))
ret = errno;
}
THR_THREAD_UNLOCK(curthread, thread);
- _thr_ref_delete(curthread, thread);
- } else {
- ret = ESRCH;
}
}
#if 0
diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c
index e1e304a..c29e8c3 100644
--- a/lib/libthr/thread/thr_init.c
+++ b/lib/libthr/thread/thr_init.c
@@ -120,6 +120,10 @@ struct umutex _rwlock_static_lock = DEFAULT_UMUTEX;
struct umutex _keytable_lock = DEFAULT_UMUTEX;
struct urwlock _thr_list_lock = DEFAULT_URWLOCK;
struct umutex _thr_event_lock = DEFAULT_UMUTEX;
+struct umutex _suspend_all_lock = DEFAULT_UMUTEX;
+struct pthread *_single_thread;
+int _suspend_all_cycle;
+int _suspend_all_waiters;
int __pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *);
int __pthread_mutex_lock(pthread_mutex_t *);
@@ -441,11 +445,14 @@ init_private(void)
_thr_umutex_init(&_keytable_lock);
_thr_urwlock_init(&_thr_atfork_lock);
_thr_umutex_init(&_thr_event_lock);
+ _thr_umutex_init(&_suspend_all_lock);
_thr_once_init();
_thr_spinlock_init();
_thr_list_init();
_thr_wake_addr_init();
_sleepq_init();
+ _single_thread = NULL;
+ _suspend_all_waiters = 0;
/*
* Avoid reinitializing some things if they don't need to be,
diff --git a/lib/libthr/thread/thr_kern.c b/lib/libthr/thread/thr_kern.c
index 48f7c65..1e7cb51 100644
--- a/lib/libthr/thread/thr_kern.c
+++ b/lib/libthr/thread/thr_kern.c
@@ -199,13 +199,6 @@ _thr_sleep(struct pthread *curthread, int clockid,
const struct timespec *abstime)
{
- curthread->will_sleep = 0;
- if (curthread->nwaiter_defer > 0) {
- _thr_wake_all(curthread->defer_waiters,
- curthread->nwaiter_defer);
- curthread->nwaiter_defer = 0;
- }
-
if (curthread->wake_addr->value != 0)
return (0);
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c
index 91b47ec..61ff077 100644
--- a/lib/libthr/thread/thr_mutex.c
+++ b/lib/libthr/thread/thr_mutex.c
@@ -92,7 +92,7 @@ int __pthread_mutex_setyieldloops_np(pthread_mutex_t *mutex, int count);
static int mutex_self_trylock(pthread_mutex_t);
static int mutex_self_lock(pthread_mutex_t,
const struct timespec *abstime);
-static int mutex_unlock_common(struct pthread_mutex *, int);
+static int mutex_unlock_common(struct pthread_mutex *, int, int *);
static int mutex_lock_sleep(struct pthread *, pthread_mutex_t,
const struct timespec *);
@@ -461,7 +461,7 @@ _pthread_mutex_unlock(pthread_mutex_t *mutex)
struct pthread_mutex *mp;
mp = *mutex;
- return (mutex_unlock_common(mp, 0));
+ return (mutex_unlock_common(mp, 0, NULL));
}
int
@@ -476,7 +476,7 @@ _mutex_cv_lock(struct pthread_mutex *m, int count)
}
int
-_mutex_cv_unlock(struct pthread_mutex *m, int *count)
+_mutex_cv_unlock(struct pthread_mutex *m, int *count, int *defer)
{
/*
@@ -484,7 +484,7 @@ _mutex_cv_unlock(struct pthread_mutex *m, int *count)
*/
*count = m->m_count;
m->m_count = 0;
- (void)mutex_unlock_common(m, 1);
+ (void)mutex_unlock_common(m, 1, defer);
return (0);
}
@@ -629,7 +629,7 @@ mutex_self_lock(struct pthread_mutex *m, const struct timespec *abstime)
}
static int
-mutex_unlock_common(struct pthread_mutex *m, int cv)
+mutex_unlock_common(struct pthread_mutex *m, int cv, int *mtx_defer)
{
struct pthread *curthread = _get_curthread();
uint32_t id;
@@ -657,12 +657,12 @@ mutex_unlock_common(struct pthread_mutex *m, int cv)
defered = 1;
m->m_flags &= ~PMUTEX_FLAG_DEFERED;
} else
- defered = 0;
+ defered = 0;
DEQUEUE_MUTEX(curthread, m);
- _thr_umutex_unlock(&m->m_lock, id);
+ _thr_umutex_unlock2(&m->m_lock, id, mtx_defer);
- if (curthread->will_sleep == 0 && defered) {
+ if (mtx_defer == NULL && defered) {
_thr_wake_all(curthread->defer_waiters,
curthread->nwaiter_defer);
curthread->nwaiter_defer = 0;
diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h
index 5224c7c..fb76290 100644
--- a/lib/libthr/thread/thr_private.h
+++ b/lib/libthr/thread/thr_private.h
@@ -721,16 +721,20 @@ extern struct umutex _rwlock_static_lock __hidden;
extern struct umutex _keytable_lock __hidden;
extern struct urwlock _thr_list_lock __hidden;
extern struct umutex _thr_event_lock __hidden;
+extern struct umutex _suspend_all_lock __hidden;
+extern int _suspend_all_waiters __hidden;
+extern int _suspend_all_cycle __hidden;
+extern struct pthread *_single_thread __hidden;
/*
* Function prototype definitions.
*/
__BEGIN_DECLS
int _thr_setthreaded(int) __hidden;
-int _mutex_cv_lock(struct pthread_mutex *, int count) __hidden;
-int _mutex_cv_unlock(struct pthread_mutex *, int *count) __hidden;
-int _mutex_cv_attach(struct pthread_mutex *, int count) __hidden;
-int _mutex_cv_detach(struct pthread_mutex *, int *count) __hidden;
+int _mutex_cv_lock(struct pthread_mutex *, int) __hidden;
+int _mutex_cv_unlock(struct pthread_mutex *, int *, int *) __hidden;
+int _mutex_cv_attach(struct pthread_mutex *, int) __hidden;
+int _mutex_cv_detach(struct pthread_mutex *, int *) __hidden;
int _mutex_owned(struct pthread *, const struct pthread_mutex *) __hidden;
int _mutex_reinit(pthread_mutex_t *) __hidden;
void _mutex_fork(struct pthread *curthread) __hidden;
@@ -777,6 +781,8 @@ int _thr_setscheduler(lwpid_t, int, const struct sched_param *) __hidden;
void _thr_signal_prefork(void) __hidden;
void _thr_signal_postfork(void) __hidden;
void _thr_signal_postfork_child(void) __hidden;
+void _thr_suspend_all_lock(struct pthread *) __hidden;
+void _thr_suspend_all_unlock(struct pthread *) __hidden;
void _thr_try_gc(struct pthread *, struct pthread *) __hidden;
int _rtp_to_schedparam(const struct rtprio *rtp, int *policy,
struct sched_param *param) __hidden;
diff --git a/lib/libthr/thread/thr_resume_np.c b/lib/libthr/thread/thr_resume_np.c
index a3066bc..53377da 100644
--- a/lib/libthr/thread/thr_resume_np.c
+++ b/lib/libthr/thread/thr_resume_np.c
@@ -63,7 +63,11 @@ _pthread_resume_all_np(void)
{
struct pthread *curthread = _get_curthread();
struct pthread *thread;
+ int old_nocancel;
+ old_nocancel = curthread->no_cancel;
+ curthread->no_cancel = 1;
+ _thr_suspend_all_lock(curthread);
/* Take the thread list lock: */
THREAD_LIST_RDLOCK(curthread);
@@ -77,6 +81,9 @@ _pthread_resume_all_np(void)
/* Release the thread list lock: */
THREAD_LIST_UNLOCK(curthread);
+ _thr_suspend_all_unlock(curthread);
+ curthread->no_cancel = old_nocancel;
+ _thr_testcancel(curthread);
}
static void
diff --git a/lib/libthr/thread/thr_setprio.c b/lib/libthr/thread/thr_setprio.c
index b1b2352..4b7d2c0 100644
--- a/lib/libthr/thread/thr_setprio.c
+++ b/lib/libthr/thread/thr_setprio.c
@@ -45,38 +45,22 @@ _pthread_setprio(pthread_t pthread, int prio)
int ret;
param.sched_priority = prio;
- if (pthread == curthread) {
+ if (pthread == curthread)
THR_LOCK(curthread);
- if (curthread->attr.sched_policy == SCHED_OTHER ||
- curthread->attr.prio == prio) {
- curthread->attr.prio = prio;
- ret = 0;
- } else {
- ret = _thr_setscheduler(curthread->tid,
- curthread->attr.sched_policy, &param);
- if (ret == -1)
- ret = errno;
- else
- curthread->attr.prio = prio;
- }
- THR_UNLOCK(curthread);
- } else if ((ret = _thr_ref_add(curthread, pthread, /*include dead*/0))
- == 0) {
- THR_THREAD_LOCK(curthread, pthread);
- if (pthread->attr.sched_policy == SCHED_OTHER ||
- pthread->attr.prio == prio) {
+ else if ((ret = _thr_find_thread(curthread, pthread, /*include dead*/0)))
+ return (ret);
+ if (pthread->attr.sched_policy == SCHED_OTHER ||
+ pthread->attr.prio == prio) {
+ pthread->attr.prio = prio;
+ ret = 0;
+ } else {
+ ret = _thr_setscheduler(pthread->tid,
+ pthread->attr.sched_policy, &param);
+ if (ret == -1)
+ ret = errno;
+ else
pthread->attr.prio = prio;
- ret = 0;
- } else {
- ret = _thr_setscheduler(pthread->tid,
- curthread->attr.sched_policy, &param);
- if (ret == -1)
- ret = errno;
- else
- pthread->attr.prio = prio;
- }
- THR_THREAD_UNLOCK(curthread, pthread);
- _thr_ref_delete(curthread, pthread);
}
+ THR_THREAD_UNLOCK(curthread, pthread);
return (ret);
}
diff --git a/lib/libthr/thread/thr_setschedparam.c b/lib/libthr/thread/thr_setschedparam.c
index 59d62dc..6e98fb4 100644
--- a/lib/libthr/thread/thr_setschedparam.c
+++ b/lib/libthr/thread/thr_setschedparam.c
@@ -53,42 +53,25 @@ _pthread_setschedparam(pthread_t pthread, int policy,
struct pthread *curthread = _get_curthread();
int ret;
- if (pthread == curthread) {
+ if (pthread == curthread)
THR_LOCK(curthread);
- if (curthread->attr.sched_policy == policy &&
- (policy == SCHED_OTHER ||
- curthread->attr.prio == param->sched_priority)) {
- pthread->attr.prio = param->sched_priority;
- THR_UNLOCK(curthread);
- return (0);
- }
- ret = _thr_setscheduler(curthread->tid, policy, param);
- if (ret == -1)
- ret = errno;
- else {
- curthread->attr.sched_policy = policy;
- curthread->attr.prio = param->sched_priority;
- }
- THR_UNLOCK(curthread);
- } else if ((ret = _thr_ref_add(curthread, pthread, /*include dead*/0))
- == 0) {
- THR_THREAD_LOCK(curthread, pthread);
- if (pthread->attr.sched_policy == policy &&
- (policy == SCHED_OTHER ||
- pthread->attr.prio == param->sched_priority)) {
- pthread->attr.prio = param->sched_priority;
- THR_THREAD_UNLOCK(curthread, pthread);
- return (0);
- }
- ret = _thr_setscheduler(pthread->tid, policy, param);
- if (ret == -1)
- ret = errno;
- else {
- pthread->attr.sched_policy = policy;
- pthread->attr.prio = param->sched_priority;
- }
+ else if ((ret = _thr_find_thread(curthread, pthread,
+ /*include dead*/0)) != 0)
+ return (ret);
+ if (pthread->attr.sched_policy == policy &&
+ (policy == SCHED_OTHER ||
+ pthread->attr.prio == param->sched_priority)) {
+ pthread->attr.prio = param->sched_priority;
THR_THREAD_UNLOCK(curthread, pthread);
- _thr_ref_delete(curthread, pthread);
+ return (0);
}
+ ret = _thr_setscheduler(pthread->tid, policy, param);
+ if (ret == -1)
+ ret = errno;
+ else {
+ pthread->attr.sched_policy = policy;
+ pthread->attr.prio = param->sched_priority;
+ }
+ THR_THREAD_UNLOCK(curthread, pthread);
return (ret);
}
diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c
index 3dee8b7..d2be994 100644
--- a/lib/libthr/thread/thr_sig.c
+++ b/lib/libthr/thread/thr_sig.c
@@ -356,7 +356,8 @@ check_suspend(struct pthread *curthread)
(THR_FLAGS_NEED_SUSPEND | THR_FLAGS_SUSPENDED))
!= THR_FLAGS_NEED_SUSPEND))
return;
-
+ if (curthread == _single_thread)
+ return;
if (curthread->force_exit)
return;
diff --git a/lib/libthr/thread/thr_suspend_np.c b/lib/libthr/thread/thr_suspend_np.c
index d5868e8..284619d 100644
--- a/lib/libthr/thread/thr_suspend_np.c
+++ b/lib/libthr/thread/thr_suspend_np.c
@@ -70,14 +70,48 @@ _pthread_suspend_np(pthread_t thread)
}
void
+_thr_suspend_all_lock(struct pthread *curthread)
+{
+ int old;
+
+ THR_LOCK_ACQUIRE(curthread, &_suspend_all_lock);
+ while (_single_thread != NULL) {
+ old = _suspend_all_cycle;
+ _suspend_all_waiters++;
+ THR_LOCK_RELEASE(curthread, &_suspend_all_lock);
+ _thr_umtx_wait_uint(&_suspend_all_cycle, old, NULL, 0);
+ THR_LOCK_ACQUIRE(curthread, &_suspend_all_lock);
+ _suspend_all_waiters--;
+ }
+ _single_thread = curthread;
+ THR_LOCK_RELEASE(curthread, &_suspend_all_lock);
+}
+
+void
+_thr_suspend_all_unlock(struct pthread *curthread)
+{
+
+ THR_LOCK_ACQUIRE(curthread, &_suspend_all_lock);
+ _single_thread = NULL;
+ if (_suspend_all_waiters != 0) {
+ _suspend_all_cycle++;
+ _thr_umtx_wake(&_suspend_all_cycle, INT_MAX, 0);
+ }
+ THR_LOCK_RELEASE(curthread, &_suspend_all_lock);
+}
+
+void
_pthread_suspend_all_np(void)
{
struct pthread *curthread = _get_curthread();
struct pthread *thread;
+ int old_nocancel;
int ret;
+ old_nocancel = curthread->no_cancel;
+ curthread->no_cancel = 1;
+ _thr_suspend_all_lock(curthread);
THREAD_LIST_RDLOCK(curthread);
-
TAILQ_FOREACH(thread, &_thread_list, tle) {
if (thread != curthread) {
THR_THREAD_LOCK(curthread, thread);
@@ -115,19 +149,24 @@ restart:
THR_THREAD_UNLOCK(curthread, thread);
}
}
-
THREAD_LIST_UNLOCK(curthread);
+ _thr_suspend_all_unlock(curthread);
+ curthread->no_cancel = old_nocancel;
+ _thr_testcancel(curthread);
}
static int
suspend_common(struct pthread *curthread, struct pthread *thread,
int waitok)
{
- long tmp;
+ uint32_t tmp;
while (thread->state != PS_DEAD &&
!(thread->flags & THR_FLAGS_SUSPENDED)) {
thread->flags |= THR_FLAGS_NEED_SUSPEND;
+ /* Thread is in creation. */
+ if (thread->tid == TID_TERMINATED)
+ return (1);
tmp = thread->cycle;
_thr_send_sig(thread, SIGCANCEL);
THR_THREAD_UNLOCK(curthread, thread);
diff --git a/lib/libthr/thread/thr_umtx.h b/lib/libthr/thread/thr_umtx.h
index d74cc81..f3d95f1 100644
--- a/lib/libthr/thread/thr_umtx.h
+++ b/lib/libthr/thread/thr_umtx.h
@@ -120,7 +120,7 @@ _thr_umutex_timedlock(struct umutex *mtx, uint32_t id,
}
static inline int
-_thr_umutex_unlock(struct umutex *mtx, uint32_t id)
+_thr_umutex_unlock2(struct umutex *mtx, uint32_t id, int *defer)
{
uint32_t flags = mtx->m_flags;
@@ -132,8 +132,12 @@ _thr_umutex_unlock(struct umutex *mtx, uint32_t id)
return (EPERM);
} while (__predict_false(!atomic_cmpset_rel_32(&mtx->m_owner,
owner, UMUTEX_UNOWNED)));
- if ((owner & UMUTEX_CONTESTED))
- (void)_umtx_op_err(mtx, UMTX_OP_MUTEX_WAKE2, flags, 0, 0);
+ if ((owner & UMUTEX_CONTESTED)) {
+ if (defer == NULL)
+ (void)_umtx_op_err(mtx, UMTX_OP_MUTEX_WAKE2, flags, 0, 0);
+ else
+ *defer = 1;
+ }
return (0);
}
if (atomic_cmpset_rel_32(&mtx->m_owner, id, UMUTEX_UNOWNED))
@@ -142,6 +146,12 @@ _thr_umutex_unlock(struct umutex *mtx, uint32_t id)
}
static inline int
+_thr_umutex_unlock(struct umutex *mtx, uint32_t id)
+{
+ return _thr_umutex_unlock2(mtx, id, NULL);
+}
+
+static inline int
_thr_rwlock_tryrdlock(struct urwlock *rwlock, int flags)
{
int32_t state;
diff --git a/lib/libthread_db/Makefile.depend b/lib/libthread_db/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libthread_db/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libthread_db/libpthread_db.c b/lib/libthread_db/libpthread_db.c
index 31ea15d..e190e56 100644
--- a/lib/libthread_db/libpthread_db.c
+++ b/lib/libthread_db/libpthread_db.c
@@ -1107,7 +1107,7 @@ pt_thr_tls_get_addr(const td_thrhandle_t *th, psaddr_t _linkmap, size_t offset,
return (TD_OK);
}
-struct ta_ops libpthread_db_ops = {
+static struct ta_ops libpthread_db_ops = {
.to_init = pt_init,
.to_ta_clear_event = pt_ta_clear_event,
.to_ta_delete = pt_ta_delete,
diff --git a/lib/libthread_db/libthr_db.c b/lib/libthread_db/libthr_db.c
index b24385f..c20394c 100644
--- a/lib/libthread_db/libthr_db.c
+++ b/lib/libthread_db/libthr_db.c
@@ -765,7 +765,7 @@ pt_thr_tls_get_addr(const td_thrhandle_t *th, psaddr_t _linkmap, size_t offset,
return (TD_OK);
}
-struct ta_ops libthr_db_ops = {
+static struct ta_ops libthr_db_ops = {
.to_init = pt_init,
.to_ta_clear_event = pt_ta_clear_event,
.to_ta_delete = pt_ta_delete,
diff --git a/lib/libufs/Makefile.depend b/lib/libufs/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libufs/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libugidfw/Makefile.depend b/lib/libugidfw/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libugidfw/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libulog/Makefile.depend b/lib/libulog/Makefile.depend
new file mode 100644
index 0000000..46a6d00
--- /dev/null
+++ b/lib/libulog/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libmd \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libusb/Makefile b/lib/libusb/Makefile
index 7a9bd1b..d45dd56 100644
--- a/lib/libusb/Makefile
+++ b/lib/libusb/Makefile
@@ -18,6 +18,9 @@ NOGCCERROR=
WARNS?= 2
+DPADD= ${LIBPTHREAD}
+LDADD= -lpthread
+
MLINKS+= libusb.3 usb.3
# libusb 0.1 compat
diff --git a/lib/libusb/Makefile.depend b/lib/libusb/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libusb/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c
index 44331bc..256d67e 100644
--- a/lib/libusb/libusb10.c
+++ b/lib/libusb/libusb10.c
@@ -92,6 +92,7 @@ int
libusb_init(libusb_context **context)
{
struct libusb_context *ctx;
+ pthread_condattr_t attr;
char *debug;
int ret;
@@ -110,8 +111,28 @@ libusb_init(libusb_context **context)
TAILQ_INIT(&ctx->pollfds);
TAILQ_INIT(&ctx->tr_done);
- pthread_mutex_init(&ctx->ctx_lock, NULL);
- pthread_cond_init(&ctx->ctx_cond, NULL);
+ if (pthread_mutex_init(&ctx->ctx_lock, NULL) != 0) {
+ free(ctx);
+ return (LIBUSB_ERROR_NO_MEM);
+ }
+ if (pthread_condattr_init(&attr) != 0) {
+ pthread_mutex_destroy(&ctx->ctx_lock);
+ free(ctx);
+ return (LIBUSB_ERROR_NO_MEM);
+ }
+ if (pthread_condattr_setclock(&attr, CLOCK_MONOTONIC) != 0) {
+ pthread_mutex_destroy(&ctx->ctx_lock);
+ pthread_condattr_destroy(&attr);
+ free(ctx);
+ return (LIBUSB_ERROR_OTHER);
+ }
+ if (pthread_cond_init(&ctx->ctx_cond, &attr) != 0) {
+ pthread_mutex_destroy(&ctx->ctx_lock);
+ pthread_condattr_destroy(&attr);
+ free(ctx);
+ return (LIBUSB_ERROR_NO_MEM);
+ }
+ pthread_condattr_destroy(&attr);
ctx->ctx_handler = NO_THREAD;
diff --git a/lib/libusb/libusb10_io.c b/lib/libusb/libusb10_io.c
index 63f833a..302fdb8 100644
--- a/lib/libusb/libusb10_io.c
+++ b/lib/libusb/libusb10_io.c
@@ -307,12 +307,16 @@ libusb_wait_for_event(libusb_context *ctx, struct timeval *tv)
&ctx->ctx_lock);
return (0);
}
- err = clock_gettime(CLOCK_REALTIME, &ts);
+ err = clock_gettime(CLOCK_MONOTONIC, &ts);
if (err < 0)
return (LIBUSB_ERROR_OTHER);
- ts.tv_sec = tv->tv_sec;
- ts.tv_nsec = tv->tv_usec * 1000;
+ /*
+ * The "tv" arguments points to a relative time structure and
+ * not an absolute time structure.
+ */
+ ts.tv_sec += tv->tv_sec;
+ ts.tv_nsec += tv->tv_usec * 1000;
if (ts.tv_nsec >= 1000000000) {
ts.tv_nsec -= 1000000000;
ts.tv_sec++;
diff --git a/lib/libusb/libusb20.3 b/lib/libusb/libusb20.3
index c9bf902..af80c6c 100644
--- a/lib/libusb/libusb20.3
+++ b/lib/libusb/libusb20.3
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 14, 2010
+.Dd August 13, 2012
.Dt LIBUSB20 3
.Os
.Sh NAME
@@ -48,6 +48,7 @@ USB access library (libusb -lusb)
.Fn libusb20_tr_close "struct libusb20_transfer *xfer"
.Ft int
.Fn libusb20_tr_open "struct libusb20_transfer *xfer" "uint32_t max_buf_size" "uint32_t max_frame_count" "uint8_t ep_no"
+.Fn libusb20_tr_open_stream "struct libusb20_transfer *xfer" "uint32_t max_buf_size" "uint32_t max_frame_count" "uint8_t ep_no" "uint16_t stream_id"
.Ft struct libusb20_transfer*
.Fn libusb20_tr_get_pointer "struct libusb20_device *pdev" "uint16_t tr_index"
.Ft uint16_t
@@ -284,6 +285,16 @@ Non-zero return values indicate a LIBUSB20_ERROR value.
.
.Pp
.
+.Fn libusb20_tr_open_stream
+is identical to
+.Fn libusb20_tr_open
+except that a stream ID can be specified for BULK endpoints having
+such a feature.
+.Fn libusb20_tr_open
+can be used to open stream ID zero.
+.
+.Pp
+.
.Fn libusb20_tr_get_pointer
will return a pointer to the allocated USB transfer according to the
.Fa pdev
diff --git a/lib/libusb/libusb20.c b/lib/libusb/libusb20.c
index 75af7a1..aa45991 100644
--- a/lib/libusb/libusb20.c
+++ b/lib/libusb/libusb20.c
@@ -155,6 +155,13 @@ int
libusb20_tr_open(struct libusb20_transfer *xfer, uint32_t MaxBufSize,
uint32_t MaxFrameCount, uint8_t ep_no)
{
+ return (libusb20_tr_open_stream(xfer, MaxBufSize, MaxFrameCount, ep_no, 0));
+}
+
+int
+libusb20_tr_open_stream(struct libusb20_transfer *xfer, uint32_t MaxBufSize,
+ uint32_t MaxFrameCount, uint8_t ep_no, uint16_t stream_id)
+{
uint32_t size;
uint8_t pre_scale;
int error;
@@ -188,7 +195,7 @@ libusb20_tr_open(struct libusb20_transfer *xfer, uint32_t MaxBufSize,
memset(xfer->ppBuffer, 0, size);
error = xfer->pdev->methods->tr_open(xfer, MaxBufSize,
- MaxFrameCount, ep_no, pre_scale);
+ MaxFrameCount, ep_no, stream_id, pre_scale);
if (error) {
free(xfer->ppBuffer);
diff --git a/lib/libusb/libusb20.h b/lib/libusb/libusb20.h
index e4359fc..87e0572 100644
--- a/lib/libusb/libusb20.h
+++ b/lib/libusb/libusb20.h
@@ -202,6 +202,7 @@ struct libusb20_quirk {
/* USB transfer operations */
int libusb20_tr_close(struct libusb20_transfer *xfer);
int libusb20_tr_open(struct libusb20_transfer *xfer, uint32_t max_buf_size, uint32_t max_frame_count, uint8_t ep_no);
+int libusb20_tr_open_stream(struct libusb20_transfer *xfer, uint32_t max_buf_size, uint32_t max_frame_count, uint8_t ep_no, uint16_t stream_id);
struct libusb20_transfer *libusb20_tr_get_pointer(struct libusb20_device *pdev, uint16_t tr_index);
uint16_t libusb20_tr_get_time_complete(struct libusb20_transfer *xfer);
uint32_t libusb20_tr_get_actual_frames(struct libusb20_transfer *xfer);
diff --git a/lib/libusb/libusb20_int.h b/lib/libusb/libusb20_int.h
index bef4d02..0251c5f 100644
--- a/lib/libusb/libusb20_int.h
+++ b/lib/libusb/libusb20_int.h
@@ -110,7 +110,7 @@ typedef int (libusb20_set_config_index_t)(struct libusb20_device *pdev, uint8_t
typedef int (libusb20_check_connected_t)(struct libusb20_device *pdev);
/* USB transfer specific */
-typedef int (libusb20_tr_open_t)(struct libusb20_transfer *xfer, uint32_t MaxBufSize, uint32_t MaxFrameCount, uint8_t ep_no, uint8_t pre_scale);
+typedef int (libusb20_tr_open_t)(struct libusb20_transfer *xfer, uint32_t MaxBufSize, uint32_t MaxFrameCount, uint8_t ep_no, uint16_t stream_id, uint8_t pre_scale);
typedef int (libusb20_tr_close_t)(struct libusb20_transfer *xfer);
typedef int (libusb20_tr_clear_stall_sync_t)(struct libusb20_transfer *xfer);
typedef void (libusb20_tr_submit_t)(struct libusb20_transfer *xfer);
diff --git a/lib/libusb/libusb20_ugen20.c b/lib/libusb/libusb20_ugen20.c
index 17c948b..2c67778 100644
--- a/lib/libusb/libusb20_ugen20.c
+++ b/lib/libusb/libusb20_ugen20.c
@@ -741,9 +741,13 @@ ugen20_process(struct libusb20_device *pdev)
static int
ugen20_tr_open(struct libusb20_transfer *xfer, uint32_t MaxBufSize,
- uint32_t MaxFrameCount, uint8_t ep_no, uint8_t pre_scale)
+ uint32_t MaxFrameCount, uint8_t ep_no, uint16_t stream_id,
+ uint8_t pre_scale)
{
- struct usb_fs_open temp;
+ union {
+ struct usb_fs_open fs_open;
+ struct usb_fs_open_stream fs_open_stream;
+ } temp;
struct usb_fs_endpoint *fsep;
if (pre_scale)
@@ -754,20 +758,26 @@ ugen20_tr_open(struct libusb20_transfer *xfer, uint32_t MaxBufSize,
fsep = xfer->pdev->privBeData;
fsep += xfer->trIndex;
- temp.max_bufsize = MaxBufSize;
- temp.max_frames = MaxFrameCount;
- temp.ep_index = xfer->trIndex;
- temp.ep_no = ep_no;
+ temp.fs_open.max_bufsize = MaxBufSize;
+ temp.fs_open.max_frames = MaxFrameCount;
+ temp.fs_open.ep_index = xfer->trIndex;
+ temp.fs_open.ep_no = ep_no;
- if (ioctl(xfer->pdev->file, USB_FS_OPEN, &temp)) {
- return (LIBUSB20_ERROR_INVALID_PARAM);
+ if (stream_id != 0) {
+ temp.fs_open_stream.stream_id = stream_id;
+
+ if (ioctl(xfer->pdev->file, USB_FS_OPEN_STREAM, &temp.fs_open_stream))
+ return (LIBUSB20_ERROR_INVALID_PARAM);
+ } else {
+ if (ioctl(xfer->pdev->file, USB_FS_OPEN, &temp.fs_open))
+ return (LIBUSB20_ERROR_INVALID_PARAM);
}
/* maximums might have changed - update */
- xfer->maxFrames = temp.max_frames;
+ xfer->maxFrames = temp.fs_open.max_frames;
/* "max_bufsize" should be multiple of "max_packet_length" */
- xfer->maxTotalLength = temp.max_bufsize;
- xfer->maxPacketLen = temp.max_packet_length;
+ xfer->maxTotalLength = temp.fs_open.max_bufsize;
+ xfer->maxPacketLen = temp.fs_open.max_packet_length;
/* setup buffer and length lists using zero copy */
fsep->ppBuffer = libusb20_pass_ptr(xfer->ppBuffer);
diff --git a/lib/libusbhid/Makefile.depend b/lib/libusbhid/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libusbhid/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libusbhid/descr.c b/lib/libusbhid/descr.c
index def90da..0c66342 100644
--- a/lib/libusbhid/descr.c
+++ b/lib/libusbhid/descr.c
@@ -68,7 +68,7 @@ hid_get_report_id(int fd)
if ((rep = hid_get_report_desc(fd)) == NULL)
goto use_ioctl;
kindset = 1 << hid_input | 1 << hid_output | 1 << hid_feature;
- for (d = hid_start_parse(rep, kindset, 0); hid_get_item(d, &h); ) {
+ for (d = hid_start_parse(rep, kindset, -1); hid_get_item(d, &h); ) {
/* Return the first report ID we met. */
if (h.report_ID != 0) {
temp = h.report_ID;
diff --git a/lib/libusbhid/parse.c b/lib/libusbhid/parse.c
index 041e289..7a2b3f4 100644
--- a/lib/libusbhid/parse.c
+++ b/lib/libusbhid/parse.c
@@ -70,6 +70,7 @@ struct hid_data {
uint8_t iusage; /* current "usages_min/max" index */
uint8_t ousage; /* current "usages_min/max" offset */
uint8_t susage; /* usage set flags */
+ int32_t reportid; /* requested report ID */
};
/*------------------------------------------------------------------------*
@@ -149,7 +150,7 @@ hid_switch_rid(struct hid_data *s, struct hid_item *c, int32_t next_rID)
* hid_start_parse
*------------------------------------------------------------------------*/
hid_data_t
-hid_start_parse(report_desc_t d, int kindset, int id __unused)
+hid_start_parse(report_desc_t d, int kindset, int id)
{
struct hid_data *s;
@@ -158,6 +159,7 @@ hid_start_parse(report_desc_t d, int kindset, int id __unused)
s->start = s->p = d->data;
s->end = d->data + d->size;
s->kindset = kindset;
+ s->reportid = id;
return (s);
}
@@ -207,8 +209,8 @@ hid_get_byte(struct hid_data *s, const uint16_t wSize)
/*------------------------------------------------------------------------*
* hid_get_item
*------------------------------------------------------------------------*/
-int
-hid_get_item(hid_data_t s, hid_item_t *h)
+static int
+hid_get_item_raw(hid_data_t s, hid_item_t *h)
{
hid_item_t *c;
unsigned int bTag, bType, bSize;
@@ -509,6 +511,19 @@ hid_get_item(hid_data_t s, hid_item_t *h)
}
int
+hid_get_item(hid_data_t s, hid_item_t *h)
+{
+ int r;
+
+ for (;;) {
+ r = hid_get_item_raw(s, h);
+ if (r <= 0 || s->reportid == -1 || h->report_ID == s->reportid)
+ break;
+ }
+ return (r);
+}
+
+int
hid_report_size(report_desc_t r, enum hid_kind k, int id)
{
struct hid_data *d;
@@ -523,7 +538,7 @@ hid_report_size(report_desc_t r, enum hid_kind k, int id)
memset(&h, 0, sizeof h);
for (d = hid_start_parse(r, 1 << k, id); hid_get_item(d, &h); ) {
- if ((h.report_ID == id || id < 0) && h.kind == k) {
+ if (h.kind == k) {
/* compute minimum */
if (lpos > h.pos)
lpos = h.pos;
diff --git a/lib/libusbhid/usbhid.3 b/lib/libusbhid/usbhid.3
index c34a109..98fcdf5 100644
--- a/lib/libusbhid/usbhid.3
+++ b/lib/libusbhid/usbhid.3
@@ -144,16 +144,15 @@ fails it will return
.Ss Descriptor Parsing Functions
To parse the report descriptor the
.Fn hid_start_parse
-function should be called with a report descriptor and a set that
-describes which items that are interesting.
+function should be called with a report descriptor, a set that
+describes which items that are interesting, and the desired report
+ID (or -1 to obtain items of all report IDs).
The set is obtained by OR-ing together values
.Fa "(1 << k)"
where
.Fa k
is an item of type
.Vt hid_kind_t .
-The report ID (if present) is given by
-.Fa id .
The function returns
.Dv NULL
if the initialization fails, otherwise an opaque value to be used
diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile
index 3136a05..582ccef 100644
--- a/lib/libutil/Makefile
+++ b/lib/libutil/Makefile
@@ -25,14 +25,13 @@ CFLAGS+= -DINET6
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../libc/gen/
-MAN+= auth.3 expand_number.3 flopen.3 fparseln.3 hexdump.3 \
+MAN+= expand_number.3 flopen.3 fparseln.3 hexdump.3 \
humanize_number.3 kinfo_getallproc.3 kinfo_getfile.3 \
kinfo_getproc.3 kinfo_getvmmap.3 kld.3 login_auth.3 login_cap.3 \
login_class.3 login_ok.3 login_times.3 login_tty.3 pidfile.3 \
property.3 pty.3 quotafile.3 realhostname.3 realhostname_sa.3 \
- _secure_path.3 trimdomain.3 uucplock.3
-MAN+= auth.conf.5 login.conf.5
-MLINKS+= auth.3 auth_getval.3
+ _secure_path.3 trimdomain.3 uucplock.3 pw_util.3
+MAN+= login.conf.5
MLINKS+= kld.3 kld_isloaded.3 kld.3 kld_load.3
MLINKS+=login_auth.3 auth_cat.3 login_auth.3 auth_checknologin.3
MLINKS+=login_cap.3 login_close.3 login_cap.3 login_getcapbool.3 \
@@ -68,5 +67,18 @@ MLINKS+=quotafile.3 quota_close.3 \
quotafile.3 quota_write_usage.3
MLINKS+=uucplock.3 uu_lock.3 uucplock.3 uu_lock_txfr.3 \
uucplock.3 uu_lockerr.3 uucplock.3 uu_unlock.3
+MLINKS+=pw_util.3 pw_copy.3 \
+ pw_util.3 pw_dup.3 \
+ pw_util.3 pw_edit.3 \
+ pw_util.3 pw_equal.3 \
+ pw_util.3 pw_fini.3 \
+ pw_util.3 pw_init.3 \
+ pw_util.3 pw_make.3 \
+ pw_util.3 pw_make_v7.3 \
+ pw_util.3 pw_mkdb.3 \
+ pw_util.3 pw_lock.3 \
+ pw_util.3 pw_scan.3 \
+ pw_util.3 pw_tempname.3 \
+ pw_util.3 pw_tmp.3
.include <bsd.lib.mk>
diff --git a/lib/libutil/Makefile.depend b/lib/libutil/Makefile.depend
new file mode 100644
index 0000000..e54ec8c
--- /dev/null
+++ b/lib/libutil/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libutil/auth.3 b/lib/libutil/auth.3
deleted file mode 100644
index 247a098..0000000
--- a/lib/libutil/auth.3
+++ /dev/null
@@ -1,56 +0,0 @@
-.\"
-.\" Copyright (c) 1998 Jordan Hubbard
-.\"
-.\" 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 DEVELOPERS ``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 DEVELOPERS 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$
-.\" "
-.Dd October 7, 1998
-.Dt AUTH_GETVAL 3
-.Os
-.Sh NAME
-.Nm auth_getval
-.Nd functions for reading values from
-.Pa /etc/auth.conf
-.Sh LIBRARY
-.Lb libutil
-.Sh SYNOPSIS
-.In sys/types.h
-.In libutil.h
-.Ft char *
-.Fn auth_getval "const char *name"
-.Sh DESCRIPTION
-The function
-.Fn auth_getval
-returns the value associated with the field called
-.Fa name
-or NULL if no such field is found or the auth file cannot be opened.
-.Sh FILES
-.Pa /etc/auth.conf
-contains the name=value pairs looked up by
-.Fn auth_getval .
-.Sh SEE ALSO
-.Xr properties_free 3 ,
-.Xr properties_read 3 ,
-.Xr property_find 3 ,
-.Xr auth.conf 5
diff --git a/lib/libutil/auth.c b/lib/libutil/auth.c
index 748c3ad..b57a784 100644
--- a/lib/libutil/auth.c
+++ b/lib/libutil/auth.c
@@ -31,40 +31,14 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/types.h>
-#include <fcntl.h>
-#include <libutil.h>
-#include <paths.h>
-#include <syslog.h>
-#include <unistd.h>
-
-static properties P;
-
-static int
-initauthconf(const char *path)
-{
- int fd;
+#include <stdlib.h>
- if (!P) {
- if ((fd = open(path, O_RDONLY)) < 0) {
- syslog(LOG_ERR, "initauthconf: unable to open file: %s", path);
- return 1;
- }
- P = properties_read(fd);
- close(fd);
- if (!P) {
- syslog(LOG_ERR, "initauthconf: unable to parse file: %s", path);
- return 1;
- }
- }
- return 0;
-}
+#include <libutil.h>
char *
auth_getval(const char *name)
{
- if (!P && initauthconf(_PATH_AUTHCONF))
- return NULL;
- else
- return property_find(P, name);
+
+ (void)name;
+ return (NULL);
}
diff --git a/lib/libutil/auth.conf.5 b/lib/libutil/auth.conf.5
deleted file mode 100644
index be10eb8..0000000
--- a/lib/libutil/auth.conf.5
+++ /dev/null
@@ -1,35 +0,0 @@
-.\" Copyright (c) 1998 Jordan Hubbard
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, is permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice immediately at the beginning of the file, without modification,
-.\" 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.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd October 7, 1998
-.Dt AUTH.CONF 5
-.Os
-.Sh NAME
-.Nm auth.conf
-.Nd authentication capability database
-.Sh SYNOPSIS
-.Pa /etc/auth.conf
-.Sh DESCRIPTION
-.Nm
-contains various attributes important to the authentication
-code, most notably
-.Xr crypt 3
-for the time being.
-This documentation will be updated as the
-.Pa /etc/auth.conf
-file, which is very new, evolves.
-.Sh SEE ALSO
-.Xr auth_getval 3 ,
-.Xr crypt 3
diff --git a/lib/libutil/gr_util.c b/lib/libutil/gr_util.c
index 0173595..6d96d5e 100644
--- a/lib/libutil/gr_util.c
+++ b/lib/libutil/gr_util.c
@@ -63,6 +63,7 @@ static const char group_line_format[] = "%s:%s:%ju:";
int
gr_init(const char *dir, const char *group)
{
+
if (dir == NULL) {
strcpy(group_dir, _PATH_ETC);
} else {
@@ -88,6 +89,7 @@ gr_init(const char *dir, const char *group)
}
strcpy(group_file, group);
}
+
initialized = 1;
return (0);
}
diff --git a/lib/libutil/humanize_number.c b/lib/libutil/humanize_number.c
index 024bc6b..1cad1cf 100644
--- a/lib/libutil/humanize_number.c
+++ b/lib/libutil/humanize_number.c
@@ -76,7 +76,7 @@ humanize_number(char *buf, size_t len, int64_t quotient,
if (flags & HN_B)
prefixes = "B\0\0Ki\0Mi\0Gi\0Ti\0Pi\0Ei";
else
- prefixes = "\0\0Ki\0Mi\0Gi\0Ti\0Pi\0Ei";
+ prefixes = "\0\0\0Ki\0Mi\0Gi\0Ti\0Pi\0Ei";
} else {
baselen = 1;
if (flags & HN_DIVISOR_1000)
diff --git a/lib/libutil/login.conf.5 b/lib/libutil/login.conf.5
index e46edc6..a07e1f0 100644
--- a/lib/libutil/login.conf.5
+++ b/lib/libutil/login.conf.5
@@ -267,9 +267,11 @@ The backoff delay is the number of tries above
multiplied by 5 seconds.
.It "login-retries number 10 The number of login attempts"
allowed before the login fails.
-.It "passwd_format string md5 The encryption format that new or"
+.It "passwd_format string sha512 The encryption format that new or"
changed passwords will use.
-Valid values include "des", "md5" and "blf".
+Valid values include "des", "md5", "blf", "sha256" and "sha512"; see
+.Xr crypt 3
+for details.
NIS clients using a
.No non- Ns Fx
NIS server should probably use "des".
diff --git a/lib/libutil/property.3 b/lib/libutil/property.3
index efe0079..3d40114 100644
--- a/lib/libutil/property.3
+++ b/lib/libutil/property.3
@@ -90,8 +90,6 @@ are desired, the entire value should be enclosed in { } (curly-bracket)
characters.
Any line beginning with a # or ; character is assumed to
be a comment and will be ignored.
-.Sh SEE ALSO
-.Xr auth_getval 3
.Sh AUTHORS
.An Jordan Hubbard
.Sh BUGS
diff --git a/lib/libutil/pw_util.3 b/lib/libutil/pw_util.3
new file mode 100644
index 0000000..7ef0657
--- /dev/null
+++ b/lib/libutil/pw_util.3
@@ -0,0 +1,286 @@
+.\" Copyright (c) 2012 Baptiste Daroussin <bapt@FreeBSD.org>
+.\" 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 AUTHORS 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 AUTHORS 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$
+.\"
+.Dd October 30, 2012
+.Dt PW_UTIL 3
+.Os
+.Sh NAME
+.Nm pw_copy ,
+.Nm pw_dup ,
+.Nm pw_edit ,
+.Nm pw_equal ,
+.Nm pw_fini ,
+.Nm pw_init ,
+.Nm pw_make ,
+.Nm pw_make_v7 ,
+.Nm pw_mkdb ,
+.Nm pw_lock ,
+.Nm pw_scan ,
+.Nm pw_tempname ,
+.Nm pw_tmp
+.Nd "functions for passwd file handling"
+.Sh LIBRARY
+.Lb libutil
+.Sh SYNOPSIS
+.In pwd.h
+.In libutil.h
+.Ft int
+.Fn pw_copy "int ffd" "int tfd" "const struct passwd *pw" "const struct passwd *oldpw"
+.Ft "struct passwd *"
+.Fn pw_dup "const struct passwd *pw"
+.Ft int
+.Fn pw_edit "int nosetuid"
+.Ft int
+.Fn pw_equal "const struct passwd *pw1" "const struct passwd pw2"
+.Ft void
+.Fn pw_fini "void"
+.Ft int
+.Fn pw_init "const char *dir" const char *master"
+.Ft "char *"
+.Fn pw_make "const struct passwd *pw"
+.Ft "char *"
+.Fn pw_make_v7 "const struct passwd *pw"
+.Ft int
+.Fn pw_mkdb "const char *user"
+.Ft int
+.Fn pw_lock "void"
+.Ft "struct passwd *"
+.Fn pw_scan "const char *line" "int flags"
+.Ft "const char *"
+.Fn pw_tempname "void"
+.Ft int
+.Fn pw_tmp "int mfd"
+.Sh DESCRIPTION
+The
+.Fn pw_copy
+function reads a password file from
+.Vt ffd
+and writes it back out to
+.Vt tfd
+possibly with modifications:
+.Bl -dash
+.It
+If
+.Fa pw
+is
+.Dv NULL
+and
+.Fa oldpw
+is not
+.Dv NULL ,
+then the record represented by
+.Fa oldpw
+will not be copied (corresponding to user deletion).
+.It
+If
+.Fa pw
+and
+.Fa oldpw
+are not
+.Dv NULL
+then the record corresponding to
+.Fa pw
+will be replaced by the record corresponding to
+.Fa oldpw .
+.It
+If
+.Vt pw
+is set and
+.Vt oldpw
+is
+.Dv NULL
+then the record corresponding to
+.Vt pw
+will be appended (corresponding to user addition).
+.El
+.Pp
+The
+.Fn pw_copy
+function returns -1 in case of failure otherwise 0.
+.Pp
+The
+.Fn pw_dup
+function duplicates the
+.Vt struct passwd
+pointed to by
+.Fa pw
+and returns a pointer to the copy, or
+.Dv NULL
+in case of failure.
+The new
+.Vt struct passwd
+is allocated with
+.Xr malloc 3 ,
+and it is the caller's responsibility to free it with
+.Xr free 3 .
+.Pp
+The
+.Fn pw_edit
+function invokes the command specified by the
+.Ev EDITOR
+environment variable (or
+.Pa /usr/bin/vi
+if
+.Ev EDITOR
+is not defined)
+on a temporary copy of the master password file created by
+.Fn pw_tmp .
+If the file was modified,
+.Fn pw_edit
+installs it and regenerates the password database.
+The
+.Fn pw_edit
+function returns -1 in case of failure, 0 if the file was not modified,
+and a non-zero positive number if the file was modified and successfully
+installed.
+.Pp
+The
+.Fn pw_equal
+function compares two
+.Vt struct passwd
+and returns 0 if they are equal.
+.Pp
+The
+.Fn pw_fini
+function destroy the temporary file created by
+.Fn pw_tmp
+if any,
+kills any running instance of
+.Ev EDITOR
+executed by
+.Fn pw_edit
+if any,
+and closes the lock created by
+.Fn pw_lock
+if any.
+.Pp
+The
+.Fn pw_init
+initialize the static variable representing the path a password file.
+.Fa dir
+is the directory where the password file is located.
+If set to
+.Dv NULL ,
+it will default to
+.Pa /etc .
+.Fa master
+is the name of the password file.
+If set to
+.Dv NULL?
+it will default to
+.Pa master.passwd
+.Pp
+The
+.Fn pw_make
+function creates a properly formatted
+.Bx
+.Xr passwd 5
+line from a
+.Vt struct passwd ,
+and returns a pointer to the resulting string.
+The string is allocated with
+.Xr malloc 3 ,
+and it is the caller's responsibility to free it with
+.Xr free 3 .
+.Pp
+The
+.Fn pw_make_v7
+function creates a properly formatted
+.Ux V7
+.Xr passwd 5
+line from a
+.Vt struct passwd ,
+and returns a pointer to the resulting string.
+The string is allocated with
+.Xr malloc 3 ,
+and it is the caller's responsibility to free it with
+.Xr free 3 .
+.Pp
+The
+.Fn pw_mkdb
+function regenerates the password database by running
+.Xr pw_mkdb 8 .
+If
+.Fa user
+only the record corresponding to that user will be updated.
+The
+.Fn pw_mkdb
+function returns 0 in case of success and -1 in case of failure.
+.Pp
+The
+.Fn pw_lock
+function locks the master password file.
+It returns 0 in case of success and -1 in case of failure.
+.Pp
+The
+.Fn pw_scan
+function is a wrapper around the internal libc function
+.Fn __pw_scan .
+It scans the master password file for a line corresponding to the
+.Fa line
+provided and return a
+.Vt struct passwd
+if it matched an existing record.
+In case of failure, it returns
+.Dv NULL .
+Otherwise, it returns a pointer to a
+.Vt struct passwd
+containing the matching record.
+The
+.Vt struct passwd
+is allocated with
+.Xr malloc 3 ,
+and it is the caller's responsibility to free it with
+.Xr free 3 .
+.Pp
+The
+.Fn pw_tempname
+function returns the temporary name of the masterfile created via
+.Fn pw_tmp .
+.Pp
+The
+.Fn pw_tmp
+creates and opens a presumably safe temporary password file.
+If
+.Fa mfd
+is a file descriptor to an open password file, it will be read and
+written back to the temporary password file.
+Otherwise if should be set -1.
+The
+.Fn pw_tmp
+returns an open file descriptor to the temporary password file or -1 in case of
+failure.
+.Sh AUTHORS
+Portions of this software were developed for the
+.Fx
+Project by ThinkSec AS and Network Associates Laboratories, the
+Security Research Division of Network Associates, Inc.\& under
+DARPA/SPAWAR contract N66001-01-C-8035
+.Pq Dq CBOSS ,
+as part of the DARPA CHATS research program.
+.Pp
+This manual page was written by
+.An Baptiste Daroussin Aq bapt@FreeBSD.org .
diff --git a/lib/libutil/pw_util.c b/lib/libutil/pw_util.c
index 63c63de..4bf3001 100644
--- a/lib/libutil/pw_util.c
+++ b/lib/libutil/pw_util.c
@@ -437,14 +437,21 @@ pw_copy(int ffd, int tfd, const struct passwd *pw, struct passwd *old_pw)
size_t len;
int eof, readlen;
- spw = pw;
+ if (old_pw == NULL && pw == NULL)
+ return (-1);
+
+ spw = old_pw;
+ /* deleting a user */
if (pw == NULL) {
line = NULL;
- if (old_pw == NULL)
+ } else {
+ if ((line = pw_make(pw)) == NULL)
return (-1);
- spw = old_pw;
- } else if ((line = pw_make(pw)) == NULL)
- return (-1);
+ }
+
+ /* adding a user */
+ if (spw == NULL)
+ spw = pw;
eof = 0;
len = 0;
@@ -511,7 +518,7 @@ pw_copy(int ffd, int tfd, const struct passwd *pw, struct passwd *old_pw)
*/
*q = t;
- if (fpw == NULL || fpw->pw_uid != spw->pw_uid) {
+ if (fpw == NULL || strcmp(fpw->pw_name, spw->pw_name) != 0) {
/* nope */
if (fpw != NULL)
free(fpw);
diff --git a/lib/libvgl/Makefile.depend b/lib/libvgl/Makefile.depend
new file mode 100644
index 0000000..29fda55
--- /dev/null
+++ b/lib/libvgl/Makefile.depend
@@ -0,0 +1,14 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libwrap/Makefile.depend b/lib/libwrap/Makefile.depend
new file mode 100644
index 0000000..e54ec8c
--- /dev/null
+++ b/lib/libwrap/Makefile.depend
@@ -0,0 +1,17 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/liby/Makefile.depend b/lib/liby/Makefile.depend
new file mode 100644
index 0000000..ff699f7
--- /dev/null
+++ b/lib/liby/Makefile.depend
@@ -0,0 +1,15 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libypclnt/Makefile.depend b/lib/libypclnt/Makefile.depend
new file mode 100644
index 0000000..0f7986f
--- /dev/null
+++ b/lib/libypclnt/Makefile.depend
@@ -0,0 +1,51 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/rpc \
+ include/rpcsvc \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+yp_clnt.So: yp.h
+yp_clnt.So: yp_clnt.c
+yp_clnt.o: yp.h
+yp_clnt.o: yp_clnt.c
+yp_clnt.po: yp.h
+yp_clnt.po: yp_clnt.c
+ypclnt_passwd.So: yppasswd_private.h
+ypclnt_passwd.o: yppasswd_private.h
+ypclnt_passwd.po: yppasswd_private.h
+yppasswd_clnt.So: yppasswd.h
+yppasswd_clnt.So: yppasswd_clnt.c
+yppasswd_clnt.o: yppasswd.h
+yppasswd_clnt.o: yppasswd_clnt.c
+yppasswd_clnt.po: yppasswd.h
+yppasswd_clnt.po: yppasswd_clnt.c
+yppasswd_private_clnt.So: yppasswd_private.h
+yppasswd_private_clnt.So: yppasswd_private_clnt.c
+yppasswd_private_clnt.o: yppasswd_private.h
+yppasswd_private_clnt.o: yppasswd_private_clnt.c
+yppasswd_private_clnt.po: yppasswd_private.h
+yppasswd_private_clnt.po: yppasswd_private_clnt.c
+yppasswd_private_xdr.So: yppasswd_private.h
+yppasswd_private_xdr.So: yppasswd_private_xdr.c
+yppasswd_private_xdr.o: yppasswd_private.h
+yppasswd_private_xdr.o: yppasswd_private_xdr.c
+yppasswd_private_xdr.po: yppasswd_private.h
+yppasswd_private_xdr.po: yppasswd_private_xdr.c
+yppasswd_xdr.So: yppasswd.h
+yppasswd_xdr.So: yppasswd_xdr.c
+yppasswd_xdr.o: yppasswd.h
+yppasswd_xdr.o: yppasswd_xdr.c
+yppasswd_xdr.po: yppasswd.h
+yppasswd_xdr.po: yppasswd_xdr.c
+.endif
diff --git a/lib/libz/ChangeLog b/lib/libz/ChangeLog
index f310bb0..c2c643a 100644
--- a/lib/libz/ChangeLog
+++ b/lib/libz/ChangeLog
@@ -1,12 +1,213 @@
ChangeLog file for zlib
+Changes in 1.2.7 (2 May 2012)
+- Replace use of memmove() with a simple copy for portability
+- Test for existence of strerror
+- Restore gzgetc_ for backward compatibility with 1.2.6
+- Fix build with non-GNU make on Solaris
+- Require gcc 4.0 or later on Mac OS X to use the hidden attribute
+- Include unistd.h for Watcom C
+- Use __WATCOMC__ instead of __WATCOM__
+- Do not use the visibility attribute if NO_VIZ defined
+- Improve the detection of no hidden visibility attribute
+- Avoid using __int64 for gcc or solo compilation
+- Cast to char * in gzprintf to avoid warnings [Zinser]
+- Fix make_vms.com for VAX [Zinser]
+- Don't use library or built-in byte swaps
+- Simplify test and use of gcc hidden attribute
+- Fix bug in gzclose_w() when gzwrite() fails to allocate memory
+- Add "x" (O_EXCL) and "e" (O_CLOEXEC) modes support to gzopen()
+- Fix bug in test/minigzip.c for configure --solo
+- Fix contrib/vstudio project link errors [Mohanathas]
+- Add ability to choose the builder in make_vms.com [Schweda]
+- Add DESTDIR support to mingw32 win32/Makefile.gcc
+- Fix comments in win32/Makefile.gcc for proper usage
+- Allow overriding the default install locations for cmake
+- Generate and install the pkg-config file with cmake
+- Build both a static and a shared version of zlib with cmake
+- Include version symbols for cmake builds
+- If using cmake with MSVC, add the source directory to the includes
+- Remove unneeded EXTRA_CFLAGS from win32/Makefile.gcc [Truta]
+- Move obsolete emx makefile to old [Truta]
+- Allow the use of -Wundef when compiling or using zlib
+- Avoid the use of the -u option with mktemp
+- Improve inflate() documentation on the use of Z_FINISH
+- Recognize clang as gcc
+- Add gzopen_w() in Windows for wide character path names
+- Rename zconf.h in CMakeLists.txt to move it out of the way
+- Add source directory in CMakeLists.txt for building examples
+- Look in build directory for zlib.pc in CMakeLists.txt
+- Remove gzflags from zlibvc.def in vc9 and vc10
+- Fix contrib/minizip compilation in the MinGW environment
+- Update ./configure for Solaris, support --64 [Mooney]
+- Remove -R. from Solaris shared build (possible security issue)
+- Avoid race condition for parallel make (-j) running example
+- Fix type mismatch between get_crc_table() and crc_table
+- Fix parsing of version with "-" in CMakeLists.txt [Snider, Ziegler]
+- Fix the path to zlib.map in CMakeLists.txt
+- Force the native libtool in Mac OS X to avoid GNU libtool [Beebe]
+- Add instructions to win32/Makefile.gcc for shared install [Torri]
+
+Changes in 1.2.6.1 (12 Feb 2012)
+- Avoid the use of the Objective-C reserved name "id"
+- Include io.h in gzguts.h for Microsoft compilers
+- Fix problem with ./configure --prefix and gzgetc macro
+- Include gz_header definition when compiling zlib solo
+- Put gzflags() functionality back in zutil.c
+- Avoid library header include in crc32.c for Z_SOLO
+- Use name in GCC_CLASSIC as C compiler for coverage testing, if set
+- Minor cleanup in contrib/minizip/zip.c [Vollant]
+- Update make_vms.com [Zinser]
+- Remove unnecessary gzgetc_ function
+- Use optimized byte swap operations for Microsoft and GNU [Snyder]
+- Fix minor typo in zlib.h comments [Rzesniowiecki]
+
+Changes in 1.2.6 (29 Jan 2012)
+- Update the Pascal interface in contrib/pascal
+- Fix function numbers for gzgetc_ in zlibvc.def files
+- Fix configure.ac for contrib/minizip [Schiffer]
+- Fix large-entry detection in minizip on 64-bit systems [Schiffer]
+- Have ./configure use the compiler return code for error indication
+- Fix CMakeLists.txt for cross compilation [McClure]
+- Fix contrib/minizip/zip.c for 64-bit architectures [Dalsnes]
+- Fix compilation of contrib/minizip on FreeBSD [Marquez]
+- Correct suggested usages in win32/Makefile.msc [Shachar, Horvath]
+- Include io.h for Turbo C / Borland C on all platforms [Truta]
+- Make version explicit in contrib/minizip/configure.ac [Bosmans]
+- Avoid warning for no encryption in contrib/minizip/zip.c [Vollant]
+- Minor cleanup up contrib/minizip/unzip.c [Vollant]
+- Fix bug when compiling minizip with C++ [Vollant]
+- Protect for long name and extra fields in contrib/minizip [Vollant]
+- Avoid some warnings in contrib/minizip [Vollant]
+- Add -I../.. -L../.. to CFLAGS for minizip and miniunzip
+- Add missing libs to minizip linker command
+- Add support for VPATH builds in contrib/minizip
+- Add an --enable-demos option to contrib/minizip/configure
+- Add the generation of configure.log by ./configure
+- Exit when required parameters not provided to win32/Makefile.gcc
+- Have gzputc return the character written instead of the argument
+- Use the -m option on ldconfig for BSD systems [Tobias]
+- Correct in zlib.map when deflateResetKeep was added
+
+Changes in 1.2.5.3 (15 Jan 2012)
+- Restore gzgetc function for binary compatibility
+- Do not use _lseeki64 under Borland C++ [Truta]
+- Update win32/Makefile.msc to build test/*.c [Truta]
+- Remove old/visualc6 given CMakefile and other alternatives
+- Update AS400 build files and documentation [Monnerat]
+- Update win32/Makefile.gcc to build test/*.c [Truta]
+- Permit stronger flushes after Z_BLOCK flushes
+- Avoid extraneous empty blocks when doing empty flushes
+- Permit Z_NULL arguments to deflatePending
+- Allow deflatePrime() to insert bits in the middle of a stream
+- Remove second empty static block for Z_PARTIAL_FLUSH
+- Write out all of the available bits when using Z_BLOCK
+- Insert the first two strings in the hash table after a flush
+
+Changes in 1.2.5.2 (17 Dec 2011)
+- fix ld error: unable to find version dependency 'ZLIB_1.2.5'
+- use relative symlinks for shared libs
+- Avoid searching past window for Z_RLE strategy
+- Assure that high-water mark initialization is always applied in deflate
+- Add assertions to fill_window() in deflate.c to match comments
+- Update python link in README
+- Correct spelling error in gzread.c
+- Fix bug in gzgets() for a concatenated empty gzip stream
+- Correct error in comment for gz_make()
+- Change gzread() and related to ignore junk after gzip streams
+- Allow gzread() and related to continue after gzclearerr()
+- Allow gzrewind() and gzseek() after a premature end-of-file
+- Simplify gzseek() now that raw after gzip is ignored
+- Change gzgetc() to a macro for speed (~40% speedup in testing)
+- Fix gzclose() to return the actual error last encountered
+- Always add large file support for windows
+- Include zconf.h for windows large file support
+- Include zconf.h.cmakein for windows large file support
+- Update zconf.h.cmakein on make distclean
+- Merge vestigial vsnprintf determination from zutil.h to gzguts.h
+- Clarify how gzopen() appends in zlib.h comments
+- Correct documentation of gzdirect() since junk at end now ignored
+- Add a transparent write mode to gzopen() when 'T' is in the mode
+- Update python link in zlib man page
+- Get inffixed.h and MAKEFIXED result to match
+- Add a ./config --solo option to make zlib subset with no libary use
+- Add undocumented inflateResetKeep() function for CAB file decoding
+- Add --cover option to ./configure for gcc coverage testing
+- Add #define ZLIB_CONST option to use const in the z_stream interface
+- Add comment to gzdopen() in zlib.h to use dup() when using fileno()
+- Note behavior of uncompress() to provide as much data as it can
+- Add files in contrib/minizip to aid in building libminizip
+- Split off AR options in Makefile.in and configure
+- Change ON macro to Z_ARG to avoid application conflicts
+- Facilitate compilation with Borland C++ for pragmas and vsnprintf
+- Include io.h for Turbo C / Borland C++
+- Move example.c and minigzip.c to test/
+- Simplify incomplete code table filling in inflate_table()
+- Remove code from inflate.c and infback.c that is impossible to execute
+- Test the inflate code with full coverage
+- Allow deflateSetDictionary, inflateSetDictionary at any time (in raw)
+- Add deflateResetKeep and fix inflateResetKeep to retain dictionary
+- Fix gzwrite.c to accommodate reduced memory zlib compilation
+- Have inflate() with Z_FINISH avoid the allocation of a window
+- Do not set strm->adler when doing raw inflate
+- Fix gzeof() to behave just like feof() when read is not past end of file
+- Fix bug in gzread.c when end-of-file is reached
+- Avoid use of Z_BUF_ERROR in gz* functions except for premature EOF
+- Document gzread() capability to read concurrently written files
+- Remove hard-coding of resource compiler in CMakeLists.txt [Blammo]
+
+Changes in 1.2.5.1 (10 Sep 2011)
+- Update FAQ entry on shared builds (#13)
+- Avoid symbolic argument to chmod in Makefile.in
+- Fix bug and add consts in contrib/puff [Oberhumer]
+- Update contrib/puff/zeros.raw test file to have all block types
+- Add full coverage test for puff in contrib/puff/Makefile
+- Fix static-only-build install in Makefile.in
+- Fix bug in unzGetCurrentFileInfo() in contrib/minizip [Kuno]
+- Add libz.a dependency to shared in Makefile.in for parallel builds
+- Spell out "number" (instead of "nb") in zlib.h for total_in, total_out
+- Replace $(...) with `...` in configure for non-bash sh [Bowler]
+- Add darwin* to Darwin* and solaris* to SunOS\ 5* in configure [Groffen]
+- Add solaris* to Linux* in configure to allow gcc use [Groffen]
+- Add *bsd* to Linux* case in configure [Bar-Lev]
+- Add inffast.obj to dependencies in win32/Makefile.msc
+- Correct spelling error in deflate.h [Kohler]
+- Change libzdll.a again to libz.dll.a (!) in win32/Makefile.gcc
+- Add test to configure for GNU C looking for gcc in output of $cc -v
+- Add zlib.pc generation to win32/Makefile.gcc [Weigelt]
+- Fix bug in zlib.h for _FILE_OFFSET_BITS set and _LARGEFILE64_SOURCE not
+- Add comment in zlib.h that adler32_combine with len2 < 0 makes no sense
+- Make NO_DIVIDE option in adler32.c much faster (thanks to John Reiser)
+- Make stronger test in zconf.h to include unistd.h for LFS
+- Apply Darwin patches for 64-bit file offsets to contrib/minizip [Slack]
+- Fix zlib.h LFS support when Z_PREFIX used
+- Add updated as400 support (removed from old) [Monnerat]
+- Avoid deflate sensitivity to volatile input data
+- Avoid division in adler32_combine for NO_DIVIDE
+- Clarify the use of Z_FINISH with deflateBound() amount of space
+- Set binary for output file in puff.c
+- Use u4 type for crc_table to avoid conversion warnings
+- Apply casts in zlib.h to avoid conversion warnings
+- Add OF to prototypes for adler32_combine_ and crc32_combine_ [Miller]
+- Improve inflateSync() documentation to note indeterminancy
+- Add deflatePending() function to return the amount of pending output
+- Correct the spelling of "specification" in FAQ [Randers-Pehrson]
+- Add a check in configure for stdarg.h, use for gzprintf()
+- Check that pointers fit in ints when gzprint() compiled old style
+- Add dummy name before $(SHAREDLIBV) in Makefile [Bar-Lev, Bowler]
+- Delete line in configure that adds -L. libz.a to LDFLAGS [Weigelt]
+- Add debug records in assmebler code [Londer]
+- Update RFC references to use http://tools.ietf.org/html/... [Li]
+- Add --archs option, use of libtool to configure for Mac OS X [Borstel]
+
Changes in 1.2.5 (19 Apr 2010)
- Disable visibility attribute in win32/Makefile.gcc [Bar-Lev]
- Default to libdir as sharedlibdir in configure [Nieder]
- Update copyright dates on modified source files
- Update trees.c to be able to generate modified trees.h
- Exit configure for MinGW, suggesting win32/Makefile.gcc
+- Check for NULL path in gz_open [Homurlu]
Changes in 1.2.4.5 (18 Apr 2010)
- Set sharedlibdir in configure [Torok]
@@ -261,7 +462,7 @@ Changes in 1.2.3.4 (21 Dec 2009)
- Clear bytes after deflate lookahead to avoid use of uninitialized data
- Change a limit in inftrees.c to be more transparent to Coverity Prevent
- Update win32/zlib.def with exported symbols from zlib.h
-- Correct spelling error in zlib.h [Willem]
+- Correct spelling errors in zlib.h [Willem, Sobrado]
- Allow Z_BLOCK for deflate() to force a new block
- Allow negative bits in inflatePrime() to delete existing bit buffer
- Add Z_TREES flush option to inflate() to return at end of trees
diff --git a/lib/libz/FAQ b/lib/libz/FAQ
index 1a22750..99b7cf9 100644
--- a/lib/libz/FAQ
+++ b/lib/libz/FAQ
@@ -44,8 +44,8 @@ The lastest zlib FAQ is at http://zlib.net/zlib_faq.html
6. Where's the zlib documentation (man pages, etc.)?
- It's in zlib.h . Examples of zlib usage are in the files example.c and
- minigzip.c, with more in examples/ .
+ It's in zlib.h . Examples of zlib usage are in the files test/example.c
+ and test/minigzip.c, with more in examples/ .
7. Why don't you use GNU autoconf or libtool or ...?
@@ -84,8 +84,10 @@ The lastest zlib FAQ is at http://zlib.net/zlib_faq.html
13. How can I make a Unix shared library?
- make clean
- ./configure -s
+ By default a shared (and a static) library is built for Unix. So:
+
+ make distclean
+ ./configure
make
14. How do I install a shared zlib library on Unix?
@@ -325,7 +327,7 @@ The lastest zlib FAQ is at http://zlib.net/zlib_faq.html
correctly points to the zlib specification in RFC 1950 for the "deflate"
transfer encoding, there have been reports of servers and browsers that
incorrectly produce or expect raw deflate data per the deflate
- specficiation in RFC 1951, most notably Microsoft. So even though the
+ specification in RFC 1951, most notably Microsoft. So even though the
"deflate" transfer encoding using the zlib format would be the more
efficient approach (and in fact exactly what the zlib format was designed
for), using the "gzip" transfer encoding is probably more reliable due to
diff --git a/lib/libz/FREEBSD-upgrade b/lib/libz/FREEBSD-upgrade
index 4ee4eeb..d2d251b 100644
--- a/lib/libz/FREEBSD-upgrade
+++ b/lib/libz/FREEBSD-upgrade
@@ -1,4 +1,4 @@
-$FreeBSD$
+$FreeBSD: head/lib/libz/FREEBSD-upgrade 146082 2005-05-11 03:50:50Z kientzle $
ZLib 1.2.2
diff --git a/lib/libz/Makefile b/lib/libz/Makefile
index e373e83..4ecb022 100644
--- a/lib/libz/Makefile
+++ b/lib/libz/Makefile
@@ -1,5 +1,5 @@
#
-# $FreeBSD$
+# $FreeBSD: head/lib/libz/Makefile 232263 2012-02-28 18:30:18Z dim $
#
LIB= z
@@ -35,12 +35,12 @@ SRCS+= uncompr.c
SRCS+= zopen.c
SRCS+= zutil.c
-.if ${MACHINE_ARCH} == "i386" && ${MACHINE_CPU:M*i686*}
-.PATH: ${.CURDIR}/contrib/asm686
-SRCS+= match.S
-CFLAGS+= -DASMV -DNO_UNDERLINE
-ACFLAGS+= -Wa,--noexecstack
-.endif
+#.if ${MACHINE_ARCH} == "i386" && ${MACHINE_CPU:M*i686*}
+#.PATH: ${.CURDIR}/contrib/asm686
+#SRCS+= match.S
+#CFLAGS+= -DASMV -DNO_UNDERLINE
+#ACFLAGS+= -Wa,--noexecstack
+#.endif
#.if ${MACHINE_ARCH} == "amd64"
#.PATH: ${.CURDIR}/contrib/gcc_gvmat64
diff --git a/lib/libz/Makefile.depend b/lib/libz/Makefile.depend
new file mode 100644
index 0000000..e248139
--- /dev/null
+++ b/lib/libz/Makefile.depend
@@ -0,0 +1,16 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libz/README b/lib/libz/README
index d4219bf..6f1255f 100644
--- a/lib/libz/README
+++ b/lib/libz/README
@@ -1,22 +1,22 @@
ZLIB DATA COMPRESSION LIBRARY
-zlib 1.2.5 is a general purpose data compression library. All the code is
+zlib 1.2.7 is a general purpose data compression library. All the code is
thread safe. The data format used by the zlib library is described by RFCs
(Request for Comments) 1950 to 1952 in the files
-http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
-and rfc1952.txt (gzip format).
+http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
+rfc1952 (gzip format).
All functions of the compression library are documented in the file zlib.h
(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example
-of the library is given in the file example.c which also tests that the library
-is working correctly. Another example is given in the file minigzip.c. The
-compression library itself is composed of all source files except example.c and
-minigzip.c.
+of the library is given in the file test/example.c which also tests that
+the library is working correctly. Another example is given in the file
+test/minigzip.c. The compression library itself is composed of all source
+files in the root directory.
To compile all files and run the test program, follow the instructions given at
the top of Makefile.in. In short "./configure; make test", and if that goes
-well, "make install" should work for most flavors of Unix. For Windows, use one
-of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use
+well, "make install" should work for most flavors of Unix. For Windows, use
+one of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use
make_vms.com.
Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant
@@ -31,7 +31,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
issue of Dr. Dobb's Journal; a copy of the article is available at
http://marknelson.us/1997/01/01/zlib-engine/ .
-The changes made in version 1.2.5 are documented in the file ChangeLog.
+The changes made in version 1.2.7 are documented in the file ChangeLog.
Unsupported third party contributions are provided in directory contrib/ .
@@ -44,7 +44,7 @@ http://search.cpan.org/~pmqs/IO-Compress-Zlib/ .
A Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is
available in Python 1.5 and later versions, see
-http://www.python.org/doc/lib/module-zlib.html .
+http://docs.python.org/library/zlib.html .
zlib is built into tcl: http://wiki.tcl.tk/4610 .
@@ -84,7 +84,7 @@ Acknowledgments:
Copyright notice:
- (C) 1995-2010 Jean-loup Gailly and Mark Adler
+ (C) 1995-2012 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/lib/libz/Symbol.map b/lib/libz/Symbol.map
index 2651efc..c9eef6f 100644
--- a/lib/libz/Symbol.map
+++ b/lib/libz/Symbol.map
@@ -1,7 +1,14 @@
/*
- * $FreeBSD$
+ * $FreeBSD: head/lib/libz/Symbol.map 206709 2010-04-16 20:07:24Z delphij $
*/
+ZLIB_1.2.7.0 {
+ deflatePending;
+ deflateResetKeep;
+ gzgetc_;
+ inflateResetKeep;
+};
+
ZLIB_1.2.4.0 {
adler32;
adler32_combine;
diff --git a/lib/libz/Versions.def b/lib/libz/Versions.def
index fe413a4..a5aeb28 100644
--- a/lib/libz/Versions.def
+++ b/lib/libz/Versions.def
@@ -1,8 +1,11 @@
-# $FreeBSD$
+# $FreeBSD: head/lib/libz/Versions.def 205486 2010-03-22 22:12:27Z delphij $
ZLIB_1.2.4.0 {
};
+ZLIB_1.2.7.0 {
+} ZLIB_1.2.4.0;
+
FBSD_1.2 {
} ZLIB_1.2.4.0;
diff --git a/lib/libz/adler32.c b/lib/libz/adler32.c
index 65ad6a5..a868f07 100644
--- a/lib/libz/adler32.c
+++ b/lib/libz/adler32.c
@@ -1,5 +1,5 @@
/* adler32.c -- compute the Adler-32 checksum of a data stream
- * Copyright (C) 1995-2007 Mark Adler
+ * Copyright (C) 1995-2011 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -9,9 +9,9 @@
#define local static
-local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2);
+local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
-#define BASE 65521UL /* largest prime smaller than 65536 */
+#define BASE 65521 /* largest prime smaller than 65536 */
#define NMAX 5552
/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
@@ -21,39 +21,44 @@ local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2);
#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
#define DO16(buf) DO8(buf,0); DO8(buf,8);
-/* use NO_DIVIDE if your processor does not do division in hardware */
+/* use NO_DIVIDE if your processor does not do division in hardware --
+ try it both ways to see which is faster */
#ifdef NO_DIVIDE
-# define MOD(a) \
+/* note that this assumes BASE is 65521, where 65536 % 65521 == 15
+ (thank you to John Reiser for pointing this out) */
+# define CHOP(a) \
+ do { \
+ unsigned long tmp = a >> 16; \
+ a &= 0xffffUL; \
+ a += (tmp << 4) - tmp; \
+ } while (0)
+# define MOD28(a) \
do { \
- if (a >= (BASE << 16)) a -= (BASE << 16); \
- if (a >= (BASE << 15)) a -= (BASE << 15); \
- if (a >= (BASE << 14)) a -= (BASE << 14); \
- if (a >= (BASE << 13)) a -= (BASE << 13); \
- if (a >= (BASE << 12)) a -= (BASE << 12); \
- if (a >= (BASE << 11)) a -= (BASE << 11); \
- if (a >= (BASE << 10)) a -= (BASE << 10); \
- if (a >= (BASE << 9)) a -= (BASE << 9); \
- if (a >= (BASE << 8)) a -= (BASE << 8); \
- if (a >= (BASE << 7)) a -= (BASE << 7); \
- if (a >= (BASE << 6)) a -= (BASE << 6); \
- if (a >= (BASE << 5)) a -= (BASE << 5); \
- if (a >= (BASE << 4)) a -= (BASE << 4); \
- if (a >= (BASE << 3)) a -= (BASE << 3); \
- if (a >= (BASE << 2)) a -= (BASE << 2); \
- if (a >= (BASE << 1)) a -= (BASE << 1); \
+ CHOP(a); \
if (a >= BASE) a -= BASE; \
} while (0)
-# define MOD4(a) \
+# define MOD(a) \
do { \
- if (a >= (BASE << 4)) a -= (BASE << 4); \
- if (a >= (BASE << 3)) a -= (BASE << 3); \
- if (a >= (BASE << 2)) a -= (BASE << 2); \
- if (a >= (BASE << 1)) a -= (BASE << 1); \
+ CHOP(a); \
+ MOD28(a); \
+ } while (0)
+# define MOD63(a) \
+ do { /* this assumes a is not negative */ \
+ z_off64_t tmp = a >> 32; \
+ a &= 0xffffffffL; \
+ a += (tmp << 8) - (tmp << 5) + tmp; \
+ tmp = a >> 16; \
+ a &= 0xffffL; \
+ a += (tmp << 4) - tmp; \
+ tmp = a >> 16; \
+ a &= 0xffffL; \
+ a += (tmp << 4) - tmp; \
if (a >= BASE) a -= BASE; \
} while (0)
#else
# define MOD(a) a %= BASE
-# define MOD4(a) a %= BASE
+# define MOD28(a) a %= BASE
+# define MOD63(a) a %= BASE
#endif
/* ========================================================================= */
@@ -92,7 +97,7 @@ uLong ZEXPORT adler32(adler, buf, len)
}
if (adler >= BASE)
adler -= BASE;
- MOD4(sum2); /* only added so many BASE's */
+ MOD28(sum2); /* only added so many BASE's */
return adler | (sum2 << 16);
}
@@ -137,8 +142,13 @@ local uLong adler32_combine_(adler1, adler2, len2)
unsigned long sum2;
unsigned rem;
+ /* for negative len, return invalid adler32 as a clue for debugging */
+ if (len2 < 0)
+ return 0xffffffffUL;
+
/* the derivation of this formula is left as an exercise for the reader */
- rem = (unsigned)(len2 % BASE);
+ MOD63(len2); /* assumes len2 >= 0 */
+ rem = (unsigned)len2;
sum1 = adler1 & 0xffff;
sum2 = rem * sum1;
MOD(sum2);
diff --git a/lib/libz/contrib/asm686/match.S b/lib/libz/contrib/asm686/match.S
index 06817e1..fa42109 100644
--- a/lib/libz/contrib/asm686/match.S
+++ b/lib/libz/contrib/asm686/match.S
@@ -83,17 +83,25 @@
.text
/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */
+.cfi_sections .debug_frame
longest_match:
+.cfi_startproc
/* Save registers that the compiler may be using, and adjust %esp to */
/* make room for our stack frame. */
pushl %ebp
+ .cfi_def_cfa_offset 8
+ .cfi_offset ebp, -8
pushl %edi
+ .cfi_def_cfa_offset 12
pushl %esi
+ .cfi_def_cfa_offset 16
pushl %ebx
+ .cfi_def_cfa_offset 20
subl $LocalVarsSize, %esp
+ .cfi_def_cfa_offset LocalVarsSize+20
/* Retrieve the function arguments. %ecx will hold cur_match */
/* throughout the entire function. %edx will hold the pointer to the */
@@ -108,7 +116,7 @@ longest_match:
/* if (s->prev_length >= s->good_match) { */
/* chain_length >>= 2; */
/* } */
-
+
movl dsPrevLen(%edx), %eax
movl dsGoodMatch(%edx), %ebx
cmpl %ebx, %eax
@@ -336,8 +344,14 @@ LookaheadRet:
/* Restore the stack and return from whence we came. */
addl $LocalVarsSize, %esp
+ .cfi_def_cfa_offset 20
popl %ebx
+ .cfi_def_cfa_offset 16
popl %esi
+ .cfi_def_cfa_offset 12
popl %edi
+ .cfi_def_cfa_offset 8
popl %ebp
+ .cfi_def_cfa_offset 4
+.cfi_endproc
match_init: ret
diff --git a/lib/libz/crc32.c b/lib/libz/crc32.c
index 91be372..979a719 100644
--- a/lib/libz/crc32.c
+++ b/lib/libz/crc32.c
@@ -1,5 +1,5 @@
/* crc32.c -- compute the CRC-32 of a data stream
- * Copyright (C) 1995-2006, 2010 Mark Adler
+ * Copyright (C) 1995-2006, 2010, 2011, 2012 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*
* Thanks to Rodney Brown <rbrown64@csc.com.au> for his contribution of faster
@@ -17,6 +17,8 @@
of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should
first call get_crc_table() to initialize the tables before allowing more than
one thread to use crc32().
+
+ DYNAMIC_CRC_TABLE and MAKECRCH can be #defined to write out crc32.h.
*/
#ifdef MAKECRCH
@@ -30,31 +32,11 @@
#define local static
-/* Find a four-byte integer type for crc32_little() and crc32_big(). */
-#ifndef NOBYFOUR
-# ifdef STDC /* need ANSI C limits.h to determine sizes */
-# include <limits.h>
-# define BYFOUR
-# if (UINT_MAX == 0xffffffffUL)
- typedef unsigned int u4;
-# else
-# if (ULONG_MAX == 0xffffffffUL)
- typedef unsigned long u4;
-# else
-# if (USHRT_MAX == 0xffffffffUL)
- typedef unsigned short u4;
-# else
-# undef BYFOUR /* can't find a four-byte integer type! */
-# endif
-# endif
-# endif
-# endif /* STDC */
-#endif /* !NOBYFOUR */
-
/* Definitions for doing the crc four data bytes at a time. */
+#if !defined(NOBYFOUR) && defined(Z_U4)
+# define BYFOUR
+#endif
#ifdef BYFOUR
-# define REV(w) ((((w)>>24)&0xff)+(((w)>>8)&0xff00)+ \
- (((w)&0xff00)<<8)+(((w)&0xff)<<24))
local unsigned long crc32_little OF((unsigned long,
const unsigned char FAR *, unsigned));
local unsigned long crc32_big OF((unsigned long,
@@ -68,16 +50,16 @@
local unsigned long gf2_matrix_times OF((unsigned long *mat,
unsigned long vec));
local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat));
-local uLong crc32_combine_(uLong crc1, uLong crc2, z_off64_t len2);
+local uLong crc32_combine_ OF((uLong crc1, uLong crc2, z_off64_t len2));
#ifdef DYNAMIC_CRC_TABLE
local volatile int crc_table_empty = 1;
-local unsigned long FAR crc_table[TBLS][256];
+local z_crc_t FAR crc_table[TBLS][256];
local void make_crc_table OF((void));
#ifdef MAKECRCH
- local void write_table OF((FILE *, const unsigned long FAR *));
+ local void write_table OF((FILE *, const z_crc_t FAR *));
#endif /* MAKECRCH */
/*
Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
@@ -107,9 +89,9 @@ local void make_crc_table OF((void));
*/
local void make_crc_table()
{
- unsigned long c;
+ z_crc_t c;
int n, k;
- unsigned long poly; /* polynomial exclusive-or pattern */
+ z_crc_t poly; /* polynomial exclusive-or pattern */
/* terms of polynomial defining this crc (except x^32): */
static volatile int first = 1; /* flag to limit concurrent making */
static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
@@ -121,13 +103,13 @@ local void make_crc_table()
first = 0;
/* make exclusive-or pattern from polynomial (0xedb88320UL) */
- poly = 0UL;
- for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++)
- poly |= 1UL << (31 - p[n]);
+ poly = 0;
+ for (n = 0; n < (int)(sizeof(p)/sizeof(unsigned char)); n++)
+ poly |= (z_crc_t)1 << (31 - p[n]);
/* generate a crc for every 8-bit value */
for (n = 0; n < 256; n++) {
- c = (unsigned long)n;
+ c = (z_crc_t)n;
for (k = 0; k < 8; k++)
c = c & 1 ? poly ^ (c >> 1) : c >> 1;
crc_table[0][n] = c;
@@ -138,11 +120,11 @@ local void make_crc_table()
and then the byte reversal of those as well as the first table */
for (n = 0; n < 256; n++) {
c = crc_table[0][n];
- crc_table[4][n] = REV(c);
+ crc_table[4][n] = ZSWAP32(c);
for (k = 1; k < 4; k++) {
c = crc_table[0][c & 0xff] ^ (c >> 8);
crc_table[k][n] = c;
- crc_table[k + 4][n] = REV(c);
+ crc_table[k + 4][n] = ZSWAP32(c);
}
}
#endif /* BYFOUR */
@@ -164,7 +146,7 @@ local void make_crc_table()
if (out == NULL) return;
fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n");
fprintf(out, " * Generated automatically by crc32.c\n */\n\n");
- fprintf(out, "local const unsigned long FAR ");
+ fprintf(out, "local const z_crc_t FAR ");
fprintf(out, "crc_table[TBLS][256] =\n{\n {\n");
write_table(out, crc_table[0]);
# ifdef BYFOUR
@@ -184,12 +166,13 @@ local void make_crc_table()
#ifdef MAKECRCH
local void write_table(out, table)
FILE *out;
- const unsigned long FAR *table;
+ const z_crc_t FAR *table;
{
int n;
for (n = 0; n < 256; n++)
- fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : " ", table[n],
+ fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : " ",
+ (unsigned long)(table[n]),
n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", "));
}
#endif /* MAKECRCH */
@@ -204,13 +187,13 @@ local void write_table(out, table)
/* =========================================================================
* This function can be used by asm versions of crc32()
*/
-const unsigned long FAR * ZEXPORT get_crc_table()
+const z_crc_t FAR * ZEXPORT get_crc_table()
{
#ifdef DYNAMIC_CRC_TABLE
if (crc_table_empty)
make_crc_table();
#endif /* DYNAMIC_CRC_TABLE */
- return (const unsigned long FAR *)crc_table;
+ return (const z_crc_t FAR *)crc_table;
}
/* ========================================================================= */
@@ -232,7 +215,7 @@ unsigned long ZEXPORT crc32(crc, buf, len)
#ifdef BYFOUR
if (sizeof(void *) == sizeof(ptrdiff_t)) {
- u4 endian;
+ z_crc_t endian;
endian = 1;
if (*((unsigned char *)(&endian)))
@@ -266,17 +249,17 @@ local unsigned long crc32_little(crc, buf, len)
const unsigned char FAR *buf;
unsigned len;
{
- register u4 c;
- register const u4 FAR *buf4;
+ register z_crc_t c;
+ register const z_crc_t FAR *buf4;
- c = (u4)crc;
+ c = (z_crc_t)crc;
c = ~c;
while (len && ((ptrdiff_t)buf & 3)) {
c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
len--;
}
- buf4 = (const u4 FAR *)(const void FAR *)buf;
+ buf4 = (const z_crc_t FAR *)(const void FAR *)buf;
while (len >= 32) {
DOLIT32;
len -= 32;
@@ -306,17 +289,17 @@ local unsigned long crc32_big(crc, buf, len)
const unsigned char FAR *buf;
unsigned len;
{
- register u4 c;
- register const u4 FAR *buf4;
+ register z_crc_t c;
+ register const z_crc_t FAR *buf4;
- c = REV((u4)crc);
+ c = ZSWAP32((z_crc_t)crc);
c = ~c;
while (len && ((ptrdiff_t)buf & 3)) {
c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
len--;
}
- buf4 = (const u4 FAR *)(const void FAR *)buf;
+ buf4 = (const z_crc_t FAR *)(const void FAR *)buf;
buf4--;
while (len >= 32) {
DOBIG32;
@@ -333,7 +316,7 @@ local unsigned long crc32_big(crc, buf, len)
c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
} while (--len);
c = ~c;
- return (unsigned long)(REV(c));
+ return (unsigned long)(ZSWAP32(c));
}
#endif /* BYFOUR */
diff --git a/lib/libz/crc32.h b/lib/libz/crc32.h
index 8053b61..9e0c778 100644
--- a/lib/libz/crc32.h
+++ b/lib/libz/crc32.h
@@ -2,7 +2,7 @@
* Generated automatically by crc32.c
*/
-local const unsigned long FAR crc_table[TBLS][256] =
+local const z_crc_t FAR crc_table[TBLS][256] =
{
{
0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
diff --git a/lib/libz/deflate.c b/lib/libz/deflate.c
index 5c4022f..9e4c2cb 100644
--- a/lib/libz/deflate.c
+++ b/lib/libz/deflate.c
@@ -1,5 +1,5 @@
/* deflate.c -- compress data using the deflation algorithm
- * Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
+ * Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -37,7 +37,7 @@
* REFERENCES
*
* Deutsch, L.P.,"DEFLATE Compressed Data Format Specification".
- * Available in http://www.ietf.org/rfc/rfc1951.txt
+ * Available in http://tools.ietf.org/html/rfc1951
*
* A description of the Rabin and Karp algorithm is given in the book
* "Algorithms" by R. Sedgewick, Addison-Wesley, p252.
@@ -52,7 +52,7 @@
#include "deflate.h"
const char deflate_copyright[] =
- " deflate 1.2.5 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
+ " deflate 1.2.7 Copyright 1995-2012 Jean-loup Gailly and Mark Adler ";
/*
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
@@ -155,6 +155,9 @@ local const config configuration_table[10] = {
struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
#endif
+/* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */
+#define RANK(f) (((f) << 1) - ((f) > 4 ? 9 : 0))
+
/* ===========================================================================
* Update a hash value with the given input byte
* IN assertion: all calls to to UPDATE_HASH are made with consecutive
@@ -235,10 +238,19 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
strm->msg = Z_NULL;
if (strm->zalloc == (alloc_func)0) {
+#ifdef Z_SOLO
+ return Z_STREAM_ERROR;
+#else
strm->zalloc = zcalloc;
strm->opaque = (voidpf)0;
+#endif
}
- if (strm->zfree == (free_func)0) strm->zfree = zcfree;
+ if (strm->zfree == (free_func)0)
+#ifdef Z_SOLO
+ return Z_STREAM_ERROR;
+#else
+ strm->zfree = zcfree;
+#endif
#ifdef FASTEST
if (level != 0) level = 1;
@@ -314,43 +326,70 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
uInt dictLength;
{
deflate_state *s;
- uInt length = dictLength;
- uInt n;
- IPos hash_head = 0;
+ uInt str, n;
+ int wrap;
+ unsigned avail;
+ unsigned char *next;
- if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL ||
- strm->state->wrap == 2 ||
- (strm->state->wrap == 1 && strm->state->status != INIT_STATE))
+ if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL)
return Z_STREAM_ERROR;
-
s = strm->state;
- if (s->wrap)
- strm->adler = adler32(strm->adler, dictionary, dictLength);
+ wrap = s->wrap;
+ if (wrap == 2 || (wrap == 1 && s->status != INIT_STATE) || s->lookahead)
+ return Z_STREAM_ERROR;
- if (length < MIN_MATCH) return Z_OK;
- if (length > s->w_size) {
- length = s->w_size;
- dictionary += dictLength - length; /* use the tail of the dictionary */
+ /* when using zlib wrappers, compute Adler-32 for provided dictionary */
+ if (wrap == 1)
+ strm->adler = adler32(strm->adler, dictionary, dictLength);
+ s->wrap = 0; /* avoid computing Adler-32 in read_buf */
+
+ /* if dictionary would fill window, just replace the history */
+ if (dictLength >= s->w_size) {
+ if (wrap == 0) { /* already empty otherwise */
+ CLEAR_HASH(s);
+ s->strstart = 0;
+ s->block_start = 0L;
+ s->insert = 0;
+ }
+ dictionary += dictLength - s->w_size; /* use the tail */
+ dictLength = s->w_size;
}
- zmemcpy(s->window, dictionary, length);
- s->strstart = length;
- s->block_start = (long)length;
- /* Insert all strings in the hash table (except for the last two bytes).
- * s->lookahead stays null, so s->ins_h will be recomputed at the next
- * call of fill_window.
- */
- s->ins_h = s->window[0];
- UPDATE_HASH(s, s->ins_h, s->window[1]);
- for (n = 0; n <= length - MIN_MATCH; n++) {
- INSERT_STRING(s, n, hash_head);
+ /* insert dictionary into window and hash */
+ avail = strm->avail_in;
+ next = strm->next_in;
+ strm->avail_in = dictLength;
+ strm->next_in = (Bytef *)dictionary;
+ fill_window(s);
+ while (s->lookahead >= MIN_MATCH) {
+ str = s->strstart;
+ n = s->lookahead - (MIN_MATCH-1);
+ do {
+ UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]);
+#ifndef FASTEST
+ s->prev[str & s->w_mask] = s->head[s->ins_h];
+#endif
+ s->head[s->ins_h] = (Pos)str;
+ str++;
+ } while (--n);
+ s->strstart = str;
+ s->lookahead = MIN_MATCH-1;
+ fill_window(s);
}
- if (hash_head) hash_head = 0; /* to make compiler happy */
+ s->strstart += s->lookahead;
+ s->block_start = (long)s->strstart;
+ s->insert = s->lookahead;
+ s->lookahead = 0;
+ s->match_length = s->prev_length = MIN_MATCH-1;
+ s->match_available = 0;
+ strm->next_in = next;
+ strm->avail_in = avail;
+ s->wrap = wrap;
return Z_OK;
}
/* ========================================================================= */
-int ZEXPORT deflateReset (strm)
+int ZEXPORT deflateResetKeep (strm)
z_streamp strm;
{
deflate_state *s;
@@ -380,12 +419,23 @@ int ZEXPORT deflateReset (strm)
s->last_flush = Z_NO_FLUSH;
_tr_init(s);
- lm_init(s);
return Z_OK;
}
/* ========================================================================= */
+int ZEXPORT deflateReset (strm)
+ z_streamp strm;
+{
+ int ret;
+
+ ret = deflateResetKeep(strm);
+ if (ret == Z_OK)
+ lm_init(strm->state);
+ return ret;
+}
+
+/* ========================================================================= */
int ZEXPORT deflateSetHeader (strm, head)
z_streamp strm;
gz_headerp head;
@@ -397,14 +447,42 @@ int ZEXPORT deflateSetHeader (strm, head)
}
/* ========================================================================= */
+int ZEXPORT deflatePending (strm, pending, bits)
+ unsigned *pending;
+ int *bits;
+ z_streamp strm;
+{
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (pending != Z_NULL)
+ *pending = strm->state->pending;
+ if (bits != Z_NULL)
+ *bits = strm->state->bi_valid;
+ return Z_OK;
+}
+
+/* ========================================================================= */
int ZEXPORT deflatePrime (strm, bits, value)
z_streamp strm;
int bits;
int value;
{
+ deflate_state *s;
+ int put;
+
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- strm->state->bi_valid = bits;
- strm->state->bi_buf = (ush)(value & ((1 << bits) - 1));
+ s = strm->state;
+ if ((Bytef *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3))
+ return Z_BUF_ERROR;
+ do {
+ put = Buf_size - s->bi_valid;
+ if (put > bits)
+ put = bits;
+ s->bi_buf |= (ush)((value & ((1 << put) - 1)) << s->bi_valid);
+ s->bi_valid += put;
+ _tr_flush_bits(s);
+ value >>= put;
+ bits -= put;
+ } while (bits);
return Z_OK;
}
@@ -562,19 +640,22 @@ local void putShortMSB (s, b)
local void flush_pending(strm)
z_streamp strm;
{
- unsigned len = strm->state->pending;
+ unsigned len;
+ deflate_state *s = strm->state;
+ _tr_flush_bits(s);
+ len = s->pending;
if (len > strm->avail_out) len = strm->avail_out;
if (len == 0) return;
- zmemcpy(strm->next_out, strm->state->pending_out, len);
+ zmemcpy(strm->next_out, s->pending_out, len);
strm->next_out += len;
- strm->state->pending_out += len;
+ s->pending_out += len;
strm->total_out += len;
strm->avail_out -= len;
- strm->state->pending -= len;
- if (strm->state->pending == 0) {
- strm->state->pending_out = strm->state->pending_buf;
+ s->pending -= len;
+ if (s->pending == 0) {
+ s->pending_out = s->pending_buf;
}
}
@@ -801,7 +882,7 @@ int ZEXPORT deflate (strm, flush)
* flushes. For repeated and useless calls with Z_FINISH, we keep
* returning Z_STREAM_END instead of Z_BUF_ERROR.
*/
- } else if (strm->avail_in == 0 && flush <= old_flush &&
+ } else if (strm->avail_in == 0 && RANK(flush) <= RANK(old_flush) &&
flush != Z_FINISH) {
ERR_RETURN(strm, Z_BUF_ERROR);
}
@@ -850,6 +931,7 @@ int ZEXPORT deflate (strm, flush)
if (s->lookahead == 0) {
s->strstart = 0;
s->block_start = 0L;
+ s->insert = 0;
}
}
}
@@ -945,12 +1027,12 @@ int ZEXPORT deflateCopy (dest, source)
ss = source->state;
- zmemcpy(dest, source, sizeof(z_stream));
+ zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream));
ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
if (ds == Z_NULL) return Z_MEM_ERROR;
dest->state = (struct internal_state FAR *) ds;
- zmemcpy(ds, ss, sizeof(deflate_state));
+ zmemcpy((voidpf)ds, (voidpf)ss, sizeof(deflate_state));
ds->strm = dest;
ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
@@ -966,8 +1048,8 @@ int ZEXPORT deflateCopy (dest, source)
}
/* following zmemcpy do not work for 16-bit MSDOS */
zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
- zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));
- zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));
+ zmemcpy((voidpf)ds->prev, (voidpf)ss->prev, ds->w_size * sizeof(Pos));
+ zmemcpy((voidpf)ds->head, (voidpf)ss->head, ds->hash_size * sizeof(Pos));
zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
@@ -1001,15 +1083,15 @@ local int read_buf(strm, buf, size)
strm->avail_in -= len;
+ zmemcpy(buf, strm->next_in, len);
if (strm->state->wrap == 1) {
- strm->adler = adler32(strm->adler, strm->next_in, len);
+ strm->adler = adler32(strm->adler, buf, len);
}
#ifdef GZIP
else if (strm->state->wrap == 2) {
- strm->adler = crc32(strm->adler, strm->next_in, len);
+ strm->adler = crc32(strm->adler, buf, len);
}
#endif
- zmemcpy(buf, strm->next_in, len);
strm->next_in += len;
strm->total_in += len;
@@ -1036,6 +1118,7 @@ local void lm_init (s)
s->strstart = 0;
s->block_start = 0L;
s->lookahead = 0;
+ s->insert = 0;
s->match_length = s->prev_length = MIN_MATCH-1;
s->match_available = 0;
s->ins_h = 0;
@@ -1310,6 +1393,8 @@ local void fill_window(s)
unsigned more; /* Amount of free space at the end of the window. */
uInt wsize = s->w_size;
+ Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");
+
do {
more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
@@ -1362,7 +1447,7 @@ local void fill_window(s)
#endif
more += wsize;
}
- if (s->strm->avail_in == 0) return;
+ if (s->strm->avail_in == 0) break;
/* If there was no sliding:
* strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
@@ -1381,12 +1466,24 @@ local void fill_window(s)
s->lookahead += n;
/* Initialize the hash value now that we have some input: */
- if (s->lookahead >= MIN_MATCH) {
- s->ins_h = s->window[s->strstart];
- UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
+ if (s->lookahead + s->insert >= MIN_MATCH) {
+ uInt str = s->strstart - s->insert;
+ s->ins_h = s->window[str];
+ UPDATE_HASH(s, s->ins_h, s->window[str + 1]);
#if MIN_MATCH != 3
Call UPDATE_HASH() MIN_MATCH-3 more times
#endif
+ while (s->insert) {
+ UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]);
+#ifndef FASTEST
+ s->prev[str & s->w_mask] = s->head[s->ins_h];
+#endif
+ s->head[s->ins_h] = (Pos)str;
+ str++;
+ s->insert--;
+ if (s->lookahead + s->insert < MIN_MATCH)
+ break;
+ }
}
/* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
* but this is not important since only literal bytes will be emitted.
@@ -1427,6 +1524,9 @@ local void fill_window(s)
s->high_water += init;
}
}
+
+ Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
+ "not enough room for search");
}
/* ===========================================================================
@@ -1506,8 +1606,14 @@ local block_state deflate_stored(s, flush)
FLUSH_BLOCK(s, 0);
}
}
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
+ s->insert = 0;
+ if (flush == Z_FINISH) {
+ FLUSH_BLOCK(s, 1);
+ return finish_done;
+ }
+ if ((long)s->strstart > s->block_start)
+ FLUSH_BLOCK(s, 0);
+ return block_done;
}
/* ===========================================================================
@@ -1603,8 +1709,14 @@ local block_state deflate_fast(s, flush)
}
if (bflush) FLUSH_BLOCK(s, 0);
}
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
+ s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
+ if (flush == Z_FINISH) {
+ FLUSH_BLOCK(s, 1);
+ return finish_done;
+ }
+ if (s->last_lit)
+ FLUSH_BLOCK(s, 0);
+ return block_done;
}
#ifndef FASTEST
@@ -1728,8 +1840,14 @@ local block_state deflate_slow(s, flush)
_tr_tally_lit(s, s->window[s->strstart-1], bflush);
s->match_available = 0;
}
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
+ s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
+ if (flush == Z_FINISH) {
+ FLUSH_BLOCK(s, 1);
+ return finish_done;
+ }
+ if (s->last_lit)
+ FLUSH_BLOCK(s, 0);
+ return block_done;
}
#endif /* FASTEST */
@@ -1749,11 +1867,11 @@ local block_state deflate_rle(s, flush)
for (;;) {
/* Make sure that we always have enough lookahead, except
* at the end of the input file. We need MAX_MATCH bytes
- * for the longest encodable run.
+ * for the longest run, plus one for the unrolled loop.
*/
- if (s->lookahead < MAX_MATCH) {
+ if (s->lookahead <= MAX_MATCH) {
fill_window(s);
- if (s->lookahead < MAX_MATCH && flush == Z_NO_FLUSH) {
+ if (s->lookahead <= MAX_MATCH && flush == Z_NO_FLUSH) {
return need_more;
}
if (s->lookahead == 0) break; /* flush the current block */
@@ -1776,6 +1894,7 @@ local block_state deflate_rle(s, flush)
if (s->match_length > s->lookahead)
s->match_length = s->lookahead;
}
+ Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan");
}
/* Emit match if have run of MIN_MATCH or longer, else emit literal */
@@ -1796,8 +1915,14 @@ local block_state deflate_rle(s, flush)
}
if (bflush) FLUSH_BLOCK(s, 0);
}
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
+ s->insert = 0;
+ if (flush == Z_FINISH) {
+ FLUSH_BLOCK(s, 1);
+ return finish_done;
+ }
+ if (s->last_lit)
+ FLUSH_BLOCK(s, 0);
+ return block_done;
}
/* ===========================================================================
@@ -1829,6 +1954,12 @@ local block_state deflate_huff(s, flush)
s->strstart++;
if (bflush) FLUSH_BLOCK(s, 0);
}
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
+ s->insert = 0;
+ if (flush == Z_FINISH) {
+ FLUSH_BLOCK(s, 1);
+ return finish_done;
+ }
+ if (s->last_lit)
+ FLUSH_BLOCK(s, 0);
+ return block_done;
}
diff --git a/lib/libz/deflate.h b/lib/libz/deflate.h
index cbf0d1e..fbac44d 100644
--- a/lib/libz/deflate.h
+++ b/lib/libz/deflate.h
@@ -1,5 +1,5 @@
/* deflate.h -- internal compression state
- * Copyright (C) 1995-2010 Jean-loup Gailly
+ * Copyright (C) 1995-2012 Jean-loup Gailly
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -48,6 +48,9 @@
#define MAX_BITS 15
/* All codes must not exceed MAX_BITS bits */
+#define Buf_size 16
+/* size of bit buffer in bi_buf */
+
#define INIT_STATE 42
#define EXTRA_STATE 69
#define NAME_STATE 73
@@ -188,7 +191,7 @@ typedef struct internal_state {
int nice_match; /* Stop searching when current match exceeds this */
/* used by trees.c: */
- /* Didn't use ct_data typedef below to supress compiler warning */
+ /* Didn't use ct_data typedef below to suppress compiler warning */
struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */
struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */
@@ -244,7 +247,7 @@ typedef struct internal_state {
ulg opt_len; /* bit length of current block with optimal trees */
ulg static_len; /* bit length of current block with static trees */
uInt matches; /* number of string matches in current block */
- int last_eob_len; /* bit length of EOB code for last block */
+ uInt insert; /* bytes at end of window left to insert */
#ifdef DEBUG
ulg compressed_len; /* total bit length of compressed file mod 2^32 */
@@ -294,6 +297,7 @@ void ZLIB_INTERNAL _tr_init OF((deflate_state *s));
int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf,
ulg stored_len, int last));
+void ZLIB_INTERNAL _tr_flush_bits OF((deflate_state *s));
void ZLIB_INTERNAL _tr_align OF((deflate_state *s));
void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
ulg stored_len, int last));
diff --git a/lib/libz/doc/algorithm.txt b/lib/libz/doc/algorithm.txt
index 34960bd..c97f495 100644
--- a/lib/libz/doc/algorithm.txt
+++ b/lib/libz/doc/algorithm.txt
@@ -206,4 +206,4 @@ Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3,
pp. 337-343.
``DEFLATE Compressed Data Format Specification'' available in
-http://www.ietf.org/rfc/rfc1951.txt
+http://tools.ietf.org/html/rfc1951
diff --git a/lib/libz/gzguts.h b/lib/libz/gzguts.h
index 0f8fb79..ee3f281 100644
--- a/lib/libz/gzguts.h
+++ b/lib/libz/gzguts.h
@@ -1,5 +1,5 @@
/* gzguts.h -- zlib internal header definitions for gz* operations
- * Copyright (C) 2004, 2005, 2010 Mark Adler
+ * Copyright (C) 2004, 2005, 2010, 2011, 2012 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -12,7 +12,7 @@
# endif
#endif
-#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
+#ifdef HAVE_HIDDEN
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
#else
# define ZLIB_INTERNAL
@@ -27,13 +27,65 @@
#endif
#include <fcntl.h>
+#ifdef _WIN32
+# include <stddef.h>
+#endif
+
+#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32)
+# include <io.h>
+#endif
+
#ifdef NO_DEFLATE /* for compatibility with old definition */
# define NO_GZCOMPRESS
#endif
-#ifdef _MSC_VER
-# include <io.h>
-# define vsnprintf _vsnprintf
+#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+
+#if defined(__CYGWIN__)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+
+#if defined(MSDOS) && defined(__BORLANDC__) && (BORLANDC > 0x410)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+
+#ifndef HAVE_VSNPRINTF
+# ifdef MSDOS
+/* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
+ but for now we just assume it doesn't. */
+# define NO_vsnprintf
+# endif
+# ifdef __TURBOC__
+# define NO_vsnprintf
+# endif
+# ifdef WIN32
+/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
+# if !defined(vsnprintf) && !defined(NO_vsnprintf)
+# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 )
+# define vsnprintf _vsnprintf
+# endif
+# endif
+# endif
+# ifdef __SASC
+# define NO_vsnprintf
+# endif
+# ifdef VMS
+# define NO_vsnprintf
+# endif
+# ifdef __OS400__
+# define NO_vsnprintf
+# endif
+# ifdef __MVS__
+# define NO_vsnprintf
+# endif
#endif
#ifndef local
@@ -52,7 +104,7 @@
# include <windows.h>
# define zstrerror() gz_strwinerror((DWORD)GetLastError())
#else
-# ifdef STDC
+# ifndef NO_STRERROR
# include <errno.h>
# define zstrerror() strerror(errno)
# else
@@ -68,6 +120,13 @@
ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
#endif
+/* default memLevel */
+#if MAX_MEM_LEVEL >= 8
+# define DEF_MEM_LEVEL 8
+#else
+# define DEF_MEM_LEVEL MAX_MEM_LEVEL
+#endif
+
/* default i/o buffer size -- double this for output when reading */
#define GZBUFSIZE 8192
@@ -84,23 +143,25 @@
/* internal gzip file state data structure */
typedef struct {
+ /* exposed contents for gzgetc() macro */
+ struct gzFile_s x; /* "x" for exposed */
+ /* x.have: number of bytes available at x.next */
+ /* x.next: next output data to deliver or write */
+ /* x.pos: current position in uncompressed data */
/* used for both reading and writing */
int mode; /* see gzip modes above */
int fd; /* file descriptor */
char *path; /* path or fd for error messages */
- z_off64_t pos; /* current position in uncompressed data */
unsigned size; /* buffer size, zero if not allocated yet */
unsigned want; /* requested buffer size, default is GZBUFSIZE */
unsigned char *in; /* input buffer */
unsigned char *out; /* output buffer (double-sized when reading) */
- unsigned char *next; /* next output data to deliver or write */
+ int direct; /* 0 if processing gzip, 1 if transparent */
/* just for reading */
- unsigned have; /* amount of output data unused at next */
- int eof; /* true if end of input file reached */
- z_off64_t start; /* where the gzip data started, for rewinding */
- z_off64_t raw; /* where the raw data started, for seeking */
int how; /* 0: get header, 1: copy, 2: decompress */
- int direct; /* true if last read direct, false if gzip */
+ z_off64_t start; /* where the gzip data started, for rewinding */
+ int eof; /* true if end of input file reached */
+ int past; /* true if read requested past end */
/* just for writing */
int level; /* compression level */
int strategy; /* compression strategy */
diff --git a/lib/libz/gzlib.c b/lib/libz/gzlib.c
index 999455d..33a8a5c 100644
--- a/lib/libz/gzlib.c
+++ b/lib/libz/gzlib.c
@@ -1,5 +1,5 @@
/* gzlib.c -- zlib functions common to reading and writing gzip files
- * Copyright (C) 2004, 2010 Mark Adler
+ * Copyright (C) 2004, 2010, 2011, 2012 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -8,15 +8,19 @@
#include "gzguts.h"
#include "zutil.h"
+#if defined(_WIN32) && !defined(__BORLANDC__)
+# define LSEEK _lseeki64
+#else
#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
# define LSEEK lseek64
#else
# define LSEEK lseek
#endif
+#endif
/* Local functions */
local void gz_reset OF((gz_statep));
-local gzFile gz_open OF((const char *, int, const char *));
+local gzFile gz_open OF((const void *, int, const char *));
#if defined UNDER_CE
@@ -74,25 +78,37 @@ char ZLIB_INTERNAL *gz_strwinerror (error)
local void gz_reset(state)
gz_statep state;
{
+ state->x.have = 0; /* no output data available */
if (state->mode == GZ_READ) { /* for reading ... */
- state->have = 0; /* no output data available */
state->eof = 0; /* not at end of file */
+ state->past = 0; /* have not read past end yet */
state->how = LOOK; /* look for gzip header */
- state->direct = 1; /* default for empty file */
}
state->seek = 0; /* no seek request pending */
gz_error(state, Z_OK, NULL); /* clear error */
- state->pos = 0; /* no uncompressed data yet */
+ state->x.pos = 0; /* no uncompressed data yet */
state->strm.avail_in = 0; /* no input data yet */
}
/* Open a gzip file either by name or file descriptor. */
local gzFile gz_open(path, fd, mode)
- const char *path;
+ const void *path;
int fd;
const char *mode;
{
gz_statep state;
+ size_t len;
+ int oflag;
+#ifdef O_CLOEXEC
+ int cloexec = 0;
+#endif
+#ifdef O_EXCL
+ int exclusive = 0;
+#endif
+
+ /* check input */
+ if (path == NULL)
+ return NULL;
/* allocate gzFile structure to return */
state = malloc(sizeof(gz_state));
@@ -106,6 +122,7 @@ local gzFile gz_open(path, fd, mode)
state->mode = GZ_NONE;
state->level = Z_DEFAULT_COMPRESSION;
state->strategy = Z_DEFAULT_STRATEGY;
+ state->direct = 0;
while (*mode) {
if (*mode >= '0' && *mode <= '9')
state->level = *mode - '0';
@@ -127,6 +144,16 @@ local gzFile gz_open(path, fd, mode)
return NULL;
case 'b': /* ignore -- will request binary anyway */
break;
+#ifdef O_CLOEXEC
+ case 'e':
+ cloexec = 1;
+ break;
+#endif
+#ifdef O_EXCL
+ case 'x':
+ exclusive = 1;
+ break;
+#endif
case 'f':
state->strategy = Z_FILTERED;
break;
@@ -138,6 +165,8 @@ local gzFile gz_open(path, fd, mode)
break;
case 'F':
state->strategy = Z_FIXED;
+ case 'T':
+ state->direct = 1;
default: /* could consider as an error, but just ignore */
;
}
@@ -150,30 +179,67 @@ local gzFile gz_open(path, fd, mode)
return NULL;
}
+ /* can't force transparent read */
+ if (state->mode == GZ_READ) {
+ if (state->direct) {
+ free(state);
+ return NULL;
+ }
+ state->direct = 1; /* for empty file */
+ }
+
/* save the path name for error messages */
- state->path = malloc(strlen(path) + 1);
+#ifdef _WIN32
+ if (fd == -2) {
+ len = wcstombs(NULL, path, 0);
+ if (len == (size_t)-1)
+ len = 0;
+ }
+ else
+#endif
+ len = strlen(path);
+ state->path = malloc(len + 1);
if (state->path == NULL) {
free(state);
return NULL;
}
- strcpy(state->path, path);
+#ifdef _WIN32
+ if (fd == -2)
+ if (len)
+ wcstombs(state->path, path, len + 1);
+ else
+ *(state->path) = 0;
+ else
+#endif
+ strcpy(state->path, path);
- /* open the file with the appropriate mode (or just use fd) */
- state->fd = fd != -1 ? fd :
- open(path,
+ /* compute the flags for open() */
+ oflag =
#ifdef O_LARGEFILE
- O_LARGEFILE |
+ O_LARGEFILE |
#endif
#ifdef O_BINARY
- O_BINARY |
+ O_BINARY |
+#endif
+#ifdef O_CLOEXEC
+ (cloexec ? O_CLOEXEC : 0) |
#endif
- (state->mode == GZ_READ ?
- O_RDONLY :
- (O_WRONLY | O_CREAT | (
- state->mode == GZ_WRITE ?
- O_TRUNC :
- O_APPEND))),
- 0666);
+ (state->mode == GZ_READ ?
+ O_RDONLY :
+ (O_WRONLY | O_CREAT |
+#ifdef O_EXCL
+ (exclusive ? O_EXCL : 0) |
+#endif
+ (state->mode == GZ_WRITE ?
+ O_TRUNC :
+ O_APPEND)));
+
+ /* open the file with the appropriate flags (or just use fd) */
+ state->fd = fd > -1 ? fd : (
+#ifdef _WIN32
+ fd == -2 ? _wopen(path, oflag, 0666) :
+#endif
+ open(path, oflag, 0666));
if (state->fd == -1) {
free(state->path);
free(state);
@@ -228,6 +294,16 @@ gzFile ZEXPORT gzdopen(fd, mode)
}
/* -- see zlib.h -- */
+#ifdef _WIN32
+gzFile ZEXPORT gzopen_w(path, mode)
+ const wchar_t *path;
+ const char *mode;
+{
+ return gz_open(path, -2, mode);
+}
+#endif
+
+/* -- see zlib.h -- */
int ZEXPORT gzbuffer(file, size)
gzFile file;
unsigned size;
@@ -246,8 +322,8 @@ int ZEXPORT gzbuffer(file, size)
return -1;
/* check and set requested size */
- if (size == 0)
- return -1;
+ if (size < 2)
+ size = 2; /* need two bytes to check magic header */
state->want = size;
return 0;
}
@@ -264,7 +340,8 @@ int ZEXPORT gzrewind(file)
state = (gz_statep)file;
/* check that we're reading and that there's no error */
- if (state->mode != GZ_READ || state->err != Z_OK)
+ if (state->mode != GZ_READ ||
+ (state->err != Z_OK && state->err != Z_BUF_ERROR))
return -1;
/* back up and start over */
@@ -292,7 +369,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
return -1;
/* check that there's no error */
- if (state->err != Z_OK)
+ if (state->err != Z_OK && state->err != Z_BUF_ERROR)
return -1;
/* can only seek from start or relative to current position */
@@ -301,31 +378,32 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
/* normalize offset to a SEEK_CUR specification */
if (whence == SEEK_SET)
- offset -= state->pos;
+ offset -= state->x.pos;
else if (state->seek)
offset += state->skip;
state->seek = 0;
/* if within raw area while reading, just go there */
if (state->mode == GZ_READ && state->how == COPY &&
- state->pos + offset >= state->raw) {
- ret = LSEEK(state->fd, offset - state->have, SEEK_CUR);
+ state->x.pos + offset >= 0) {
+ ret = LSEEK(state->fd, offset - state->x.have, SEEK_CUR);
if (ret == -1)
return -1;
- state->have = 0;
+ state->x.have = 0;
state->eof = 0;
+ state->past = 0;
state->seek = 0;
gz_error(state, Z_OK, NULL);
state->strm.avail_in = 0;
- state->pos += offset;
- return state->pos;
+ state->x.pos += offset;
+ return state->x.pos;
}
/* calculate skip amount, rewinding if needed for back seek when reading */
if (offset < 0) {
if (state->mode != GZ_READ) /* writing -- can't go backwards */
return -1;
- offset += state->pos;
+ offset += state->x.pos;
if (offset < 0) /* before start of file! */
return -1;
if (gzrewind(file) == -1) /* rewind, then skip to offset */
@@ -334,11 +412,11 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
/* if reading, skip what's in output buffer (one less gzgetc() check) */
if (state->mode == GZ_READ) {
- n = GT_OFF(state->have) || (z_off64_t)state->have > offset ?
- (unsigned)offset : state->have;
- state->have -= n;
- state->next += n;
- state->pos += n;
+ n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > offset ?
+ (unsigned)offset : state->x.have;
+ state->x.have -= n;
+ state->x.next += n;
+ state->x.pos += n;
offset -= n;
}
@@ -347,7 +425,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
state->seek = 1;
state->skip = offset;
}
- return state->pos + offset;
+ return state->x.pos + offset;
}
/* -- see zlib.h -- */
@@ -376,7 +454,7 @@ z_off64_t ZEXPORT gztell64(file)
return -1;
/* return position */
- return state->pos + (state->seek ? state->skip : 0);
+ return state->x.pos + (state->seek ? state->skip : 0);
}
/* -- see zlib.h -- */
@@ -436,8 +514,7 @@ int ZEXPORT gzeof(file)
return 0;
/* return end-of-file state */
- return state->mode == GZ_READ ?
- (state->eof && state->strm.avail_in == 0 && state->have == 0) : 0;
+ return state->mode == GZ_READ ? state->past : 0;
}
/* -- see zlib.h -- */
@@ -474,8 +551,10 @@ void ZEXPORT gzclearerr(file)
return;
/* clear error and end-of-file */
- if (state->mode == GZ_READ)
+ if (state->mode == GZ_READ) {
state->eof = 0;
+ state->past = 0;
+ }
gz_error(state, Z_OK, NULL);
}
@@ -497,6 +576,10 @@ void ZLIB_INTERNAL gz_error(state, err, msg)
state->msg = NULL;
}
+ /* if fatal, set state->x.have to 0 so that the gzgetc() macro fails */
+ if (err != Z_OK && err != Z_BUF_ERROR)
+ state->x.have = 0;
+
/* set error code, and if no message, then done */
state->err = err;
if (msg == NULL)
diff --git a/lib/libz/gzread.c b/lib/libz/gzread.c
index 5c37bab..bd21205 100644
--- a/lib/libz/gzread.c
+++ b/lib/libz/gzread.c
@@ -1,5 +1,5 @@
/* gzread.c -- zlib functions for reading gzip files
- * Copyright (C) 2004, 2005, 2010 Mark Adler
+ * Copyright (C) 2004, 2005, 2010, 2011, 2012 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -11,10 +11,9 @@
/* Local functions */
local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *));
local int gz_avail OF((gz_statep));
-local int gz_next4 OF((gz_statep, unsigned long *));
-local int gz_head OF((gz_statep));
+local int gz_look OF((gz_statep));
local int gz_decomp OF((gz_statep));
-local int gz_make OF((gz_statep));
+local int gz_fetch OF((gz_statep));
local int gz_skip OF((gz_statep, z_off64_t));
/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from
@@ -49,67 +48,47 @@ local int gz_load(state, buf, len, have)
error, 0 otherwise. Note that the eof flag is set when the end of the input
file is reached, even though there may be unused data in the buffer. Once
that data has been used, no more attempts will be made to read the file.
- gz_avail() assumes that strm->avail_in == 0. */
+ If strm->avail_in != 0, then the current data is moved to the beginning of
+ the input buffer, and then the remainder of the buffer is loaded with the
+ available data from the input file. */
local int gz_avail(state)
gz_statep state;
{
+ unsigned got;
z_streamp strm = &(state->strm);
- if (state->err != Z_OK)
+ if (state->err != Z_OK && state->err != Z_BUF_ERROR)
return -1;
if (state->eof == 0) {
- if (gz_load(state, state->in, state->size,
- (unsigned *)&(strm->avail_in)) == -1)
+ if (strm->avail_in) { /* copy what's there to the start */
+ unsigned char *p = state->in, *q = strm->next_in;
+ unsigned n = strm->avail_in;
+ do {
+ *p++ = *q++;
+ } while (--n);
+ }
+ if (gz_load(state, state->in + strm->avail_in,
+ state->size - strm->avail_in, &got) == -1)
return -1;
+ strm->avail_in += got;
strm->next_in = state->in;
}
return 0;
}
-/* Get next byte from input, or -1 if end or error. */
-#define NEXT() ((strm->avail_in == 0 && gz_avail(state) == -1) ? -1 : \
- (strm->avail_in == 0 ? -1 : \
- (strm->avail_in--, *(strm->next_in)++)))
-
-/* Get a four-byte little-endian integer and return 0 on success and the value
- in *ret. Otherwise -1 is returned and *ret is not modified. */
-local int gz_next4(state, ret)
- gz_statep state;
- unsigned long *ret;
-{
- int ch;
- unsigned long val;
- z_streamp strm = &(state->strm);
-
- val = NEXT();
- val += (unsigned)NEXT() << 8;
- val += (unsigned long)NEXT() << 16;
- ch = NEXT();
- if (ch == -1)
- return -1;
- val += (unsigned long)ch << 24;
- *ret = val;
- return 0;
-}
-
-/* Look for gzip header, set up for inflate or copy. state->have must be zero.
+/* Look for gzip header, set up for inflate or copy. state->x.have must be 0.
If this is the first time in, allocate required memory. state->how will be
left unchanged if there is no more input data available, will be set to COPY
if there is no gzip header and direct copying will be performed, or it will
- be set to GZIP for decompression, and the gzip header will be skipped so
- that the next available input data is the raw deflate stream. If direct
- copying, then leftover input data from the input buffer will be copied to
- the output buffer. In that case, all further file reads will be directly to
- either the output buffer or a user buffer. If decompressing, the inflate
- state and the check value will be initialized. gz_head() will return 0 on
- success or -1 on failure. Failures may include read errors or gzip header
- errors. */
-local int gz_head(state)
+ be set to GZIP for decompression. If direct copying, then leftover input
+ data from the input buffer will be copied to the output buffer. In that
+ case, all further file reads will be directly to either the output buffer or
+ a user buffer. If decompressing, the inflate state will be initialized.
+ gz_look() will return 0 on success or -1 on failure. */
+local int gz_look(state)
gz_statep state;
{
z_streamp strm = &(state->strm);
- int flags;
- unsigned len;
/* allocate read buffers and inflate memory */
if (state->size == 0) {
@@ -132,7 +111,7 @@ local int gz_head(state)
state->strm.opaque = Z_NULL;
state->strm.avail_in = 0;
state->strm.next_in = Z_NULL;
- if (inflateInit2(&(state->strm), -15) != Z_OK) { /* raw inflate */
+ if (inflateInit2(&(state->strm), 15 + 16) != Z_OK) { /* gunzip */
free(state->out);
free(state->in);
state->size = 0;
@@ -141,83 +120,45 @@ local int gz_head(state)
}
}
- /* get some data in the input buffer */
- if (strm->avail_in == 0) {
+ /* get at least the magic bytes in the input buffer */
+ if (strm->avail_in < 2) {
if (gz_avail(state) == -1)
return -1;
if (strm->avail_in == 0)
return 0;
}
- /* look for the gzip magic header bytes 31 and 139 */
- if (strm->next_in[0] == 31) {
- strm->avail_in--;
- strm->next_in++;
- if (strm->avail_in == 0 && gz_avail(state) == -1)
- return -1;
- if (strm->avail_in && strm->next_in[0] == 139) {
- /* we have a gzip header, woo hoo! */
- strm->avail_in--;
- strm->next_in++;
-
- /* skip rest of header */
- if (NEXT() != 8) { /* compression method */
- gz_error(state, Z_DATA_ERROR, "unknown compression method");
- return -1;
- }
- flags = NEXT();
- if (flags & 0xe0) { /* reserved flag bits */
- gz_error(state, Z_DATA_ERROR, "unknown header flags set");
- return -1;
- }
- NEXT(); /* modification time */
- NEXT();
- NEXT();
- NEXT();
- NEXT(); /* extra flags */
- NEXT(); /* operating system */
- if (flags & 4) { /* extra field */
- len = (unsigned)NEXT();
- len += (unsigned)NEXT() << 8;
- while (len--)
- if (NEXT() < 0)
- break;
- }
- if (flags & 8) /* file name */
- while (NEXT() > 0)
- ;
- if (flags & 16) /* comment */
- while (NEXT() > 0)
- ;
- if (flags & 2) { /* header crc */
- NEXT();
- NEXT();
- }
- /* an unexpected end of file is not checked for here -- it will be
- noticed on the first request for uncompressed data */
-
- /* set up for decompression */
- inflateReset(strm);
- strm->adler = crc32(0L, Z_NULL, 0);
- state->how = GZIP;
- state->direct = 0;
- return 0;
- }
- else {
- /* not a gzip file -- save first byte (31) and fall to raw i/o */
- state->out[0] = 31;
- state->have = 1;
- }
+ /* look for gzip magic bytes -- if there, do gzip decoding (note: there is
+ a logical dilemma here when considering the case of a partially written
+ gzip file, to wit, if a single 31 byte is written, then we cannot tell
+ whether this is a single-byte file, or just a partially written gzip
+ file -- for here we assume that if a gzip file is being written, then
+ the header will be written in a single operation, so that reading a
+ single byte is sufficient indication that it is not a gzip file) */
+ if (strm->avail_in > 1 &&
+ strm->next_in[0] == 31 && strm->next_in[1] == 139) {
+ inflateReset(strm);
+ state->how = GZIP;
+ state->direct = 0;
+ return 0;
+ }
+
+ /* no gzip header -- if we were decoding gzip before, then this is trailing
+ garbage. Ignore the trailing garbage and finish. */
+ if (state->direct == 0) {
+ strm->avail_in = 0;
+ state->eof = 1;
+ state->x.have = 0;
+ return 0;
}
- /* doing raw i/o, save start of raw data for seeking, copy any leftover
- input to output -- this assumes that the output buffer is larger than
- the input buffer, which also assures space for gzungetc() */
- state->raw = state->pos;
- state->next = state->out;
+ /* doing raw i/o, copy any leftover input to output -- this assumes that
+ the output buffer is larger than the input buffer, which also assures
+ space for gzungetc() */
+ state->x.next = state->out;
if (strm->avail_in) {
- memcpy(state->next + state->have, strm->next_in, strm->avail_in);
- state->have += strm->avail_in;
+ memcpy(state->x.next, strm->next_in, strm->avail_in);
+ state->x.have = strm->avail_in;
strm->avail_in = 0;
}
state->how = COPY;
@@ -226,19 +167,15 @@ local int gz_head(state)
}
/* Decompress from input to the provided next_out and avail_out in the state.
- If the end of the compressed data is reached, then verify the gzip trailer
- check value and length (modulo 2^32). state->have and state->next are set
- to point to the just decompressed data, and the crc is updated. If the
- trailer is verified, state->how is reset to LOOK to look for the next gzip
- stream or raw data, once state->have is depleted. Returns 0 on success, -1
- on failure. Failures may include invalid compressed data or a failed gzip
- trailer verification. */
+ On return, state->x.have and state->x.next point to the just decompressed
+ data. If the gzip stream completes, state->how is reset to LOOK to look for
+ the next gzip stream or raw data, once state->x.have is depleted. Returns 0
+ on success, -1 on failure. */
local int gz_decomp(state)
gz_statep state;
{
- int ret;
+ int ret = Z_OK;
unsigned had;
- unsigned long crc, len;
z_streamp strm = &(state->strm);
/* fill output buffer up to end of deflate stream */
@@ -248,15 +185,15 @@ local int gz_decomp(state)
if (strm->avail_in == 0 && gz_avail(state) == -1)
return -1;
if (strm->avail_in == 0) {
- gz_error(state, Z_DATA_ERROR, "unexpected end of file");
- return -1;
+ gz_error(state, Z_BUF_ERROR, "unexpected end of file");
+ break;
}
/* decompress and handle errors */
ret = inflate(strm, Z_NO_FLUSH);
if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) {
gz_error(state, Z_STREAM_ERROR,
- "internal error: inflate stream corrupt");
+ "internal error: inflate stream corrupt");
return -1;
}
if (ret == Z_MEM_ERROR) {
@@ -265,67 +202,55 @@ local int gz_decomp(state)
}
if (ret == Z_DATA_ERROR) { /* deflate stream invalid */
gz_error(state, Z_DATA_ERROR,
- strm->msg == NULL ? "compressed data error" : strm->msg);
+ strm->msg == NULL ? "compressed data error" : strm->msg);
return -1;
}
} while (strm->avail_out && ret != Z_STREAM_END);
- /* update available output and crc check value */
- state->have = had - strm->avail_out;
- state->next = strm->next_out - state->have;
- strm->adler = crc32(strm->adler, state->next, state->have);
+ /* update available output */
+ state->x.have = had - strm->avail_out;
+ state->x.next = strm->next_out - state->x.have;
- /* check gzip trailer if at end of deflate stream */
- if (ret == Z_STREAM_END) {
- if (gz_next4(state, &crc) == -1 || gz_next4(state, &len) == -1) {
- gz_error(state, Z_DATA_ERROR, "unexpected end of file");
- return -1;
- }
- if (crc != strm->adler) {
- gz_error(state, Z_DATA_ERROR, "incorrect data check");
- return -1;
- }
- if (len != (strm->total_out & 0xffffffffL)) {
- gz_error(state, Z_DATA_ERROR, "incorrect length check");
- return -1;
- }
- state->how = LOOK; /* ready for next stream, once have is 0 (leave
- state->direct unchanged to remember how) */
- }
+ /* if the gzip stream completed successfully, look for another */
+ if (ret == Z_STREAM_END)
+ state->how = LOOK;
/* good decompression */
return 0;
}
-/* Make data and put in the output buffer. Assumes that state->have == 0.
+/* Fetch data and put it in the output buffer. Assumes state->x.have is 0.
Data is either copied from the input file or decompressed from the input
file depending on state->how. If state->how is LOOK, then a gzip header is
- looked for (and skipped if found) to determine wither to copy or decompress.
- Returns -1 on error, otherwise 0. gz_make() will leave state->have as COPY
- or GZIP unless the end of the input file has been reached and all data has
- been processed. */
-local int gz_make(state)
+ looked for to determine whether to copy or decompress. Returns -1 on error,
+ otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the
+ end of the input file has been reached and all data has been processed. */
+local int gz_fetch(state)
gz_statep state;
{
z_streamp strm = &(state->strm);
- if (state->how == LOOK) { /* look for gzip header */
- if (gz_head(state) == -1)
- return -1;
- if (state->have) /* got some data from gz_head() */
+ do {
+ switch(state->how) {
+ case LOOK: /* -> LOOK, COPY (only if never GZIP), or GZIP */
+ if (gz_look(state) == -1)
+ return -1;
+ if (state->how == LOOK)
+ return 0;
+ break;
+ case COPY: /* -> COPY */
+ if (gz_load(state, state->out, state->size << 1, &(state->x.have))
+ == -1)
+ return -1;
+ state->x.next = state->out;
return 0;
- }
- if (state->how == COPY) { /* straight copy */
- if (gz_load(state, state->out, state->size << 1, &(state->have)) == -1)
- return -1;
- state->next = state->out;
- }
- else if (state->how == GZIP) { /* decompress */
- strm->avail_out = state->size << 1;
- strm->next_out = state->out;
- if (gz_decomp(state) == -1)
- return -1;
- }
+ case GZIP: /* -> GZIP or LOOK (if end of gzip stream) */
+ strm->avail_out = state->size << 1;
+ strm->next_out = state->out;
+ if (gz_decomp(state) == -1)
+ return -1;
+ }
+ } while (state->x.have == 0 && (!state->eof || strm->avail_in));
return 0;
}
@@ -339,12 +264,12 @@ local int gz_skip(state, len)
/* skip over len bytes or reach end-of-file, whichever comes first */
while (len)
/* skip over whatever is in output buffer */
- if (state->have) {
- n = GT_OFF(state->have) || (z_off64_t)state->have > len ?
- (unsigned)len : state->have;
- state->have -= n;
- state->next += n;
- state->pos += n;
+ if (state->x.have) {
+ n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > len ?
+ (unsigned)len : state->x.have;
+ state->x.have -= n;
+ state->x.next += n;
+ state->x.pos += n;
len -= n;
}
@@ -355,7 +280,7 @@ local int gz_skip(state, len)
/* need more data to skip -- load up output buffer */
else {
/* get more output, looking for header if required */
- if (gz_make(state) == -1)
+ if (gz_fetch(state) == -1)
return -1;
}
return 0;
@@ -377,14 +302,15 @@ int ZEXPORT gzread(file, buf, len)
state = (gz_statep)file;
strm = &(state->strm);
- /* check that we're reading and that there's no error */
- if (state->mode != GZ_READ || state->err != Z_OK)
+ /* check that we're reading and that there's no (serious) error */
+ if (state->mode != GZ_READ ||
+ (state->err != Z_OK && state->err != Z_BUF_ERROR))
return -1;
/* since an int is returned, make sure len fits in one, otherwise return
with an error (this avoids the flaw in the interface) */
if ((int)len < 0) {
- gz_error(state, Z_BUF_ERROR, "requested length does not fit in int");
+ gz_error(state, Z_DATA_ERROR, "requested length does not fit in int");
return -1;
}
@@ -403,24 +329,26 @@ int ZEXPORT gzread(file, buf, len)
got = 0;
do {
/* first just try copying data from the output buffer */
- if (state->have) {
- n = state->have > len ? len : state->have;
- memcpy(buf, state->next, n);
- state->next += n;
- state->have -= n;
+ if (state->x.have) {
+ n = state->x.have > len ? len : state->x.have;
+ memcpy(buf, state->x.next, n);
+ state->x.next += n;
+ state->x.have -= n;
}
/* output buffer empty -- return if we're at the end of the input */
- else if (state->eof && strm->avail_in == 0)
+ else if (state->eof && strm->avail_in == 0) {
+ state->past = 1; /* tried to read past end */
break;
+ }
/* need output data -- for small len or new stream load up our output
buffer */
else if (state->how == LOOK || len < (state->size << 1)) {
/* get more output, looking for header if required */
- if (gz_make(state) == -1)
+ if (gz_fetch(state) == -1)
return -1;
- continue; /* no progress yet -- go back to memcpy() above */
+ continue; /* no progress yet -- go back to copy above */
/* the copy above assures that we will leave with space in the
output buffer, allowing at least one gzungetc() to succeed */
}
@@ -437,15 +365,15 @@ int ZEXPORT gzread(file, buf, len)
strm->next_out = buf;
if (gz_decomp(state) == -1)
return -1;
- n = state->have;
- state->have = 0;
+ n = state->x.have;
+ state->x.have = 0;
}
/* update progress */
len -= n;
buf = (char *)buf + n;
got += n;
- state->pos += n;
+ state->x.pos += n;
} while (len);
/* return number of bytes read into user buffer (will fit in int) */
@@ -453,6 +381,7 @@ int ZEXPORT gzread(file, buf, len)
}
/* -- see zlib.h -- */
+#undef gzgetc
int ZEXPORT gzgetc(file)
gzFile file;
{
@@ -465,15 +394,16 @@ int ZEXPORT gzgetc(file)
return -1;
state = (gz_statep)file;
- /* check that we're reading and that there's no error */
- if (state->mode != GZ_READ || state->err != Z_OK)
+ /* check that we're reading and that there's no (serious) error */
+ if (state->mode != GZ_READ ||
+ (state->err != Z_OK && state->err != Z_BUF_ERROR))
return -1;
/* try output buffer (no need to check for skip request) */
- if (state->have) {
- state->have--;
- state->pos++;
- return *(state->next)++;
+ if (state->x.have) {
+ state->x.have--;
+ state->x.pos++;
+ return *(state->x.next)++;
}
/* nothing there -- try gzread() */
@@ -481,6 +411,12 @@ int ZEXPORT gzgetc(file)
return ret < 1 ? -1 : buf[0];
}
+int ZEXPORT gzgetc_(file)
+gzFile file;
+{
+ return gzgetc(file);
+}
+
/* -- see zlib.h -- */
int ZEXPORT gzungetc(c, file)
int c;
@@ -493,8 +429,9 @@ int ZEXPORT gzungetc(c, file)
return -1;
state = (gz_statep)file;
- /* check that we're reading and that there's no error */
- if (state->mode != GZ_READ || state->err != Z_OK)
+ /* check that we're reading and that there's no (serious) error */
+ if (state->mode != GZ_READ ||
+ (state->err != Z_OK && state->err != Z_BUF_ERROR))
return -1;
/* process a skip request */
@@ -509,32 +446,34 @@ int ZEXPORT gzungetc(c, file)
return -1;
/* if output buffer empty, put byte at end (allows more pushing) */
- if (state->have == 0) {
- state->have = 1;
- state->next = state->out + (state->size << 1) - 1;
- state->next[0] = c;
- state->pos--;
+ if (state->x.have == 0) {
+ state->x.have = 1;
+ state->x.next = state->out + (state->size << 1) - 1;
+ state->x.next[0] = c;
+ state->x.pos--;
+ state->past = 0;
return c;
}
/* if no room, give up (must have already done a gzungetc()) */
- if (state->have == (state->size << 1)) {
- gz_error(state, Z_BUF_ERROR, "out of room to push characters");
+ if (state->x.have == (state->size << 1)) {
+ gz_error(state, Z_DATA_ERROR, "out of room to push characters");
return -1;
}
/* slide output data if needed and insert byte before existing data */
- if (state->next == state->out) {
- unsigned char *src = state->out + state->have;
+ if (state->x.next == state->out) {
+ unsigned char *src = state->out + state->x.have;
unsigned char *dest = state->out + (state->size << 1);
while (src > state->out)
*--dest = *--src;
- state->next = dest;
+ state->x.next = dest;
}
- state->have++;
- state->next--;
- state->next[0] = c;
- state->pos--;
+ state->x.have++;
+ state->x.next--;
+ state->x.next[0] = c;
+ state->x.pos--;
+ state->past = 0;
return c;
}
@@ -554,8 +493,9 @@ char * ZEXPORT gzgets(file, buf, len)
return NULL;
state = (gz_statep)file;
- /* check that we're reading and that there's no error */
- if (state->mode != GZ_READ || state->err != Z_OK)
+ /* check that we're reading and that there's no (serious) error */
+ if (state->mode != GZ_READ ||
+ (state->err != Z_OK && state->err != Z_BUF_ERROR))
return NULL;
/* process a skip request */
@@ -572,32 +512,31 @@ char * ZEXPORT gzgets(file, buf, len)
left = (unsigned)len - 1;
if (left) do {
/* assure that something is in the output buffer */
- if (state->have == 0) {
- if (gz_make(state) == -1)
- return NULL; /* error */
- if (state->have == 0) { /* end of file */
- if (buf == str) /* got bupkus */
- return NULL;
- break; /* got something -- return it */
- }
+ if (state->x.have == 0 && gz_fetch(state) == -1)
+ return NULL; /* error */
+ if (state->x.have == 0) { /* end of file */
+ state->past = 1; /* read past end */
+ break; /* return what we have */
}
/* look for end-of-line in current output buffer */
- n = state->have > left ? left : state->have;
- eol = memchr(state->next, '\n', n);
+ n = state->x.have > left ? left : state->x.have;
+ eol = memchr(state->x.next, '\n', n);
if (eol != NULL)
- n = (unsigned)(eol - state->next) + 1;
+ n = (unsigned)(eol - state->x.next) + 1;
/* copy through end-of-line, or remainder if not found */
- memcpy(buf, state->next, n);
- state->have -= n;
- state->next += n;
- state->pos += n;
+ memcpy(buf, state->x.next, n);
+ state->x.have -= n;
+ state->x.next += n;
+ state->x.pos += n;
left -= n;
buf += n;
} while (left && eol == NULL);
- /* found end-of-line or out of space -- terminate string and return it */
+ /* return terminated string, or if nothing, end of file */
+ if (buf == str)
+ return NULL;
buf[0] = 0;
return str;
}
@@ -613,16 +552,12 @@ int ZEXPORT gzdirect(file)
return 0;
state = (gz_statep)file;
- /* check that we're reading */
- if (state->mode != GZ_READ)
- return 0;
-
/* if the state is not known, but we can find out, then do so (this is
mainly for right after a gzopen() or gzdopen()) */
- if (state->how == LOOK && state->have == 0)
- (void)gz_head(state);
+ if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0)
+ (void)gz_look(state);
- /* return 1 if reading direct, 0 if decompressing a gzip stream */
+ /* return 1 if transparent, 0 if processing a gzip stream */
return state->direct;
}
@@ -630,7 +565,7 @@ int ZEXPORT gzdirect(file)
int ZEXPORT gzclose_r(file)
gzFile file;
{
- int ret;
+ int ret, err;
gz_statep state;
/* get internal structure */
@@ -648,9 +583,10 @@ int ZEXPORT gzclose_r(file)
free(state->out);
free(state->in);
}
+ err = state->err == Z_BUF_ERROR ? Z_BUF_ERROR : Z_OK;
gz_error(state, Z_OK, NULL);
free(state->path);
ret = close(state->fd);
free(state);
- return ret ? Z_ERRNO : Z_OK;
+ return ret ? Z_ERRNO : err;
}
diff --git a/lib/libz/gzwrite.c b/lib/libz/gzwrite.c
index 0f14731..20344a2 100644
--- a/lib/libz/gzwrite.c
+++ b/lib/libz/gzwrite.c
@@ -1,8 +1,10 @@
/* gzwrite.c -- zlib functions for writing gzip files
- * Copyright (C) 2004, 2005, 2010 Mark Adler
+ * Copyright (C) 2004, 2005, 2010, 2011, 2012 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
+/* $FreeBSD$ */
+
#include "gzguts.h"
#include <unistd.h>
@@ -19,44 +21,55 @@ local int gz_init(state)
int ret;
z_streamp strm = &(state->strm);
- /* allocate input and output buffers */
+ /* allocate input buffer */
state->in = malloc(state->want);
- state->out = malloc(state->want);
- if (state->in == NULL || state->out == NULL) {
- if (state->out != NULL)
- free(state->out);
- if (state->in != NULL)
- free(state->in);
+ if (state->in == NULL) {
gz_error(state, Z_MEM_ERROR, "out of memory");
return -1;
}
- /* allocate deflate memory, set up for gzip compression */
- strm->zalloc = Z_NULL;
- strm->zfree = Z_NULL;
- strm->opaque = Z_NULL;
- ret = deflateInit2(strm, state->level, Z_DEFLATED,
- 15 + 16, 8, state->strategy);
- if (ret != Z_OK) {
- free(state->in);
- gz_error(state, Z_MEM_ERROR, "out of memory");
- return -1;
+ /* only need output buffer and deflate state if compressing */
+ if (!state->direct) {
+ /* allocate output buffer */
+ state->out = malloc(state->want);
+ if (state->out == NULL) {
+ free(state->in);
+ gz_error(state, Z_MEM_ERROR, "out of memory");
+ return -1;
+ }
+
+ /* allocate deflate memory, set up for gzip compression */
+ strm->zalloc = Z_NULL;
+ strm->zfree = Z_NULL;
+ strm->opaque = Z_NULL;
+ ret = deflateInit2(strm, state->level, Z_DEFLATED,
+ MAX_WBITS + 16, DEF_MEM_LEVEL, state->strategy);
+ if (ret != Z_OK) {
+ free(state->out);
+ free(state->in);
+ gz_error(state, Z_MEM_ERROR, "out of memory");
+ return -1;
+ }
}
/* mark state as initialized */
state->size = state->want;
- /* initialize write buffer */
- strm->avail_out = state->size;
- strm->next_out = state->out;
- state->next = strm->next_out;
+ /* initialize write buffer if compressing */
+ if (!state->direct) {
+ strm->avail_out = state->size;
+ strm->next_out = state->out;
+ state->x.next = strm->next_out;
+ }
return 0;
}
/* Compress whatever is at avail_in and next_in and write to the output file.
Return -1 if there is an error writing to the output file, otherwise 0.
flush is assumed to be a valid deflate() flush value. If flush is Z_FINISH,
- then the deflate() state is reset to start a new gzip stream. */
+ then the deflate() state is reset to start a new gzip stream. If gz->direct
+ is true, then simply write to the output file without compressing, and
+ ignore flush. */
local int gz_comp(state, flush)
gz_statep state;
int flush;
@@ -69,6 +82,17 @@ local int gz_comp(state, flush)
if (state->size == 0 && gz_init(state) == -1)
return -1;
+ /* write directly if requested */
+ if (state->direct) {
+ got = write(state->fd, strm->next_in, strm->avail_in);
+ if (got < 0 || (unsigned)got != strm->avail_in) {
+ gz_error(state, Z_ERRNO, zstrerror());
+ return -1;
+ }
+ strm->avail_in = 0;
+ return 0;
+ }
+
/* run deflate() on provided input until it produces no more output */
ret = Z_OK;
do {
@@ -76,8 +100,8 @@ local int gz_comp(state, flush)
doing Z_FINISH then don't write until we get to Z_STREAM_END */
if (strm->avail_out == 0 || (flush != Z_NO_FLUSH &&
(flush != Z_FINISH || ret == Z_STREAM_END))) {
- have = (unsigned)(strm->next_out - state->next);
- if (have && ((got = write(state->fd, state->next, have)) < 0 ||
+ have = (unsigned)(strm->next_out - state->x.next);
+ if (have && ((got = write(state->fd, state->x.next, have)) < 0 ||
(unsigned)got != have)) {
gz_error(state, Z_ERRNO, zstrerror());
return -1;
@@ -86,7 +110,7 @@ local int gz_comp(state, flush)
strm->avail_out = state->size;
strm->next_out = state->out;
}
- state->next = strm->next_out;
+ state->x.next = strm->next_out;
}
/* compress */
@@ -132,7 +156,7 @@ local int gz_zero(state, len)
}
strm->avail_in = n;
strm->next_in = state->in;
- state->pos += n;
+ state->x.pos += n;
if (gz_comp(state, Z_NO_FLUSH) == -1)
return -1;
len -= n;
@@ -164,7 +188,7 @@ int ZEXPORT gzwrite(file, buf, len)
/* since an int is returned, make sure len fits in one, otherwise return
with an error (this avoids the flaw in the interface) */
if ((int)len < 0) {
- gz_error(state, Z_BUF_ERROR, "requested length does not fit in int");
+ gz_error(state, Z_DATA_ERROR, "requested length does not fit in int");
return 0;
}
@@ -194,7 +218,7 @@ int ZEXPORT gzwrite(file, buf, len)
n = len;
memcpy(strm->next_in + strm->avail_in, buf, n);
strm->avail_in += n;
- state->pos += n;
+ state->x.pos += n;
buf = (char *)buf + n;
len -= n;
if (len && gz_comp(state, Z_NO_FLUSH) == -1)
@@ -209,7 +233,7 @@ int ZEXPORT gzwrite(file, buf, len)
/* directly compress user buffer to file */
strm->avail_in = len;
strm->next_in = (voidp)buf;
- state->pos += len;
+ state->x.pos += len;
if (gz_comp(state, Z_NO_FLUSH) == -1)
return 0;
}
@@ -250,15 +274,15 @@ int ZEXPORT gzputc(file, c)
if (strm->avail_in == 0)
strm->next_in = state->in;
strm->next_in[strm->avail_in++] = c;
- state->pos++;
- return c;
+ state->x.pos++;
+ return c & 0xff;
}
/* no room in buffer or not initialized, use gz_write() */
buf[0] = c;
if (gzwrite(file, buf, 1) != 1)
return -1;
- return c;
+ return c & 0xff;
}
/* -- see zlib.h -- */
@@ -275,7 +299,7 @@ int ZEXPORT gzputs(file, str)
return ret == 0 && len != 0 ? -1 : ret;
}
-#ifdef STDC
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
#include <stdarg.h>
/* -- see zlib.h -- */
@@ -317,19 +341,19 @@ int ZEXPORTVA gzprintf (gzFile file, const char *format, ...)
va_start(va, format);
#ifdef NO_vsnprintf
# ifdef HAS_vsprintf_void
- (void)vsprintf(state->in, format, va);
+ (void)vsprintf((char *)(state->in), format, va);
va_end(va);
for (len = 0; len < size; len++)
if (state->in[len] == 0) break;
# else
- len = vsprintf(state->in, format, va);
+ len = vsprintf((char *)(state->in), format, va);
va_end(va);
# endif
#else
# ifdef HAS_vsnprintf_void
- (void)vsnprintf(state->in, size, format, va);
+ (void)vsnprintf((char *)(state->in), size, format, va);
va_end(va);
- len = strlen(state->in);
+ len = strlen((char *)(state->in));
# else
len = vsnprintf((char *)(state->in), size, format, va);
va_end(va);
@@ -343,11 +367,11 @@ int ZEXPORTVA gzprintf (gzFile file, const char *format, ...)
/* update buffer and position, defer compression until needed */
strm->avail_in = (unsigned)len;
strm->next_in = state->in;
- state->pos += len;
+ state->x.pos += len;
return len;
}
-#else /* !STDC */
+#else /* !STDC && !Z_HAVE_STDARG_H */
/* -- see zlib.h -- */
int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
@@ -367,6 +391,10 @@ int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
state = (gz_statep)file;
strm = &(state->strm);
+ /* check that can really pass pointer in ints */
+ if (sizeof(int) != sizeof(void *))
+ return 0;
+
/* check that we're writing and that there's no error */
if (state->mode != GZ_WRITE || state->err != Z_OK)
return 0;
@@ -391,22 +419,23 @@ int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
state->in[size - 1] = 0;
#ifdef NO_snprintf
# ifdef HAS_sprintf_void
- sprintf(state->in, format, a1, a2, a3, a4, a5, a6, a7, a8,
+ sprintf((char *)(state->in), format, a1, a2, a3, a4, a5, a6, a7, a8,
a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
for (len = 0; len < size; len++)
if (state->in[len] == 0) break;
# else
- len = sprintf(state->in, format, a1, a2, a3, a4, a5, a6, a7, a8,
- a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
+ len = sprintf((char *)(state->in), format, a1, a2, a3, a4, a5, a6, a7, a8,
+ a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
# endif
#else
# ifdef HAS_snprintf_void
- snprintf(state->in, size, format, a1, a2, a3, a4, a5, a6, a7, a8,
+ snprintf((char *)(state->in), size, format, a1, a2, a3, a4, a5, a6, a7, a8,
a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
- len = strlen(state->in);
+ len = strlen((char *)(state->in));
# else
- len = snprintf(state->in, size, format, a1, a2, a3, a4, a5, a6, a7, a8,
- a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
+ len = snprintf((char *)(state->in), size, format, a1, a2, a3, a4, a5, a6,
+ a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18,
+ a19, a20);
# endif
#endif
@@ -417,7 +446,7 @@ int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
/* update buffer and position, defer compression until needed */
strm->avail_in = (unsigned)len;
strm->next_in = state->in;
- state->pos += len;
+ state->x.pos += len;
return len;
}
@@ -501,7 +530,7 @@ int ZEXPORT gzsetparams(file, level, strategy)
int ZEXPORT gzclose_w(file)
gzFile file;
{
- int ret = 0;
+ int ret = Z_OK;
gz_statep state;
/* get internal structure */
@@ -516,17 +545,24 @@ int ZEXPORT gzclose_w(file)
/* check for seek request */
if (state->seek) {
state->seek = 0;
- ret += gz_zero(state, state->skip);
+ if (gz_zero(state, state->skip) == -1)
+ ret = state->err;
}
/* flush, free memory, and close file */
- ret += gz_comp(state, Z_FINISH);
- (void)deflateEnd(&(state->strm));
- free(state->out);
- free(state->in);
+ if (state->size) {
+ if (gz_comp(state, Z_FINISH) == -1)
+ ret = state->err;
+ if (!state->direct) {
+ (void)deflateEnd(&(state->strm));
+ free(state->out);
+ }
+ free(state->in);
+ }
gz_error(state, Z_OK, NULL);
free(state->path);
- ret += close(state->fd);
+ if (close(state->fd) == -1)
+ ret = Z_ERRNO;
free(state);
- return ret ? Z_ERRNO : Z_OK;
+ return ret;
}
diff --git a/lib/libz/infback.c b/lib/libz/infback.c
index af3a8c9..981aff1 100644
--- a/lib/libz/infback.c
+++ b/lib/libz/infback.c
@@ -1,5 +1,5 @@
/* infback.c -- inflate using a call-back interface
- * Copyright (C) 1995-2009 Mark Adler
+ * Copyright (C) 1995-2011 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -42,10 +42,19 @@ int stream_size;
return Z_STREAM_ERROR;
strm->msg = Z_NULL; /* in case we return an error */
if (strm->zalloc == (alloc_func)0) {
+#ifdef Z_SOLO
+ return Z_STREAM_ERROR;
+#else
strm->zalloc = zcalloc;
strm->opaque = (voidpf)0;
+#endif
}
- if (strm->zfree == (free_func)0) strm->zfree = zcfree;
+ if (strm->zfree == (free_func)0)
+#ifdef Z_SOLO
+ return Z_STREAM_ERROR;
+#else
+ strm->zfree = zcfree;
+#endif
state = (struct inflate_state FAR *)ZALLOC(strm, 1,
sizeof(struct inflate_state));
if (state == Z_NULL) return Z_MEM_ERROR;
@@ -394,7 +403,6 @@ void FAR *out_desc;
PULLBYTE();
}
if (here.val < 16) {
- NEEDBITS(here.bits);
DROPBITS(here.bits);
state->lens[state->have++] = here.val;
}
diff --git a/lib/libz/inffixed.h b/lib/libz/inffixed.h
index 75ed4b5..d628327 100644
--- a/lib/libz/inffixed.h
+++ b/lib/libz/inffixed.h
@@ -2,9 +2,9 @@
* Generated automatically by makefixed().
*/
- /* WARNING: this file should *not* be used by applications. It
- is part of the implementation of the compression library and
- is subject to change. Applications should only use zlib.h.
+ /* WARNING: this file should *not* be used by applications.
+ It is part of the implementation of this library and is
+ subject to change. Applications should only use zlib.h.
*/
static const code lenfix[512] = {
diff --git a/lib/libz/inflate.c b/lib/libz/inflate.c
index a8431ab..47418a1 100644
--- a/lib/libz/inflate.c
+++ b/lib/libz/inflate.c
@@ -1,5 +1,5 @@
/* inflate.c -- zlib decompression
- * Copyright (C) 1995-2010 Mark Adler
+ * Copyright (C) 1995-2012 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -100,7 +100,7 @@ local int updatewindow OF((z_streamp strm, unsigned out));
local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
unsigned len));
-int ZEXPORT inflateReset(strm)
+int ZEXPORT inflateResetKeep(strm)
z_streamp strm;
{
struct inflate_state FAR *state;
@@ -109,15 +109,13 @@ z_streamp strm;
state = (struct inflate_state FAR *)strm->state;
strm->total_in = strm->total_out = state->total = 0;
strm->msg = Z_NULL;
- strm->adler = 1; /* to support ill-conceived Java test suite */
+ if (state->wrap) /* to support ill-conceived Java test suite */
+ strm->adler = state->wrap & 1;
state->mode = HEAD;
state->last = 0;
state->havedict = 0;
state->dmax = 32768U;
state->head = Z_NULL;
- state->wsize = 0;
- state->whave = 0;
- state->wnext = 0;
state->hold = 0;
state->bits = 0;
state->lencode = state->distcode = state->next = state->codes;
@@ -127,6 +125,19 @@ z_streamp strm;
return Z_OK;
}
+int ZEXPORT inflateReset(strm)
+z_streamp strm;
+{
+ struct inflate_state FAR *state;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ state->wsize = 0;
+ state->whave = 0;
+ state->wnext = 0;
+ return inflateResetKeep(strm);
+}
+
int ZEXPORT inflateReset2(strm, windowBits)
z_streamp strm;
int windowBits;
@@ -180,10 +191,19 @@ int stream_size;
if (strm == Z_NULL) return Z_STREAM_ERROR;
strm->msg = Z_NULL; /* in case we return an error */
if (strm->zalloc == (alloc_func)0) {
+#ifdef Z_SOLO
+ return Z_STREAM_ERROR;
+#else
strm->zalloc = zcalloc;
strm->opaque = (voidpf)0;
+#endif
}
- if (strm->zfree == (free_func)0) strm->zfree = zcfree;
+ if (strm->zfree == (free_func)0)
+#ifdef Z_SOLO
+ return Z_STREAM_ERROR;
+#else
+ strm->zfree = zcfree;
+#endif
state = (struct inflate_state FAR *)
ZALLOC(strm, 1, sizeof(struct inflate_state));
if (state == Z_NULL) return Z_MEM_ERROR;
@@ -321,8 +341,8 @@ void makefixed()
low = 0;
for (;;) {
if ((low % 7) == 0) printf("\n ");
- printf("{%u,%u,%d}", state.lencode[low].op, state.lencode[low].bits,
- state.lencode[low].val);
+ printf("{%u,%u,%d}", (low & 127) == 99 ? 64 : state.lencode[low].op,
+ state.lencode[low].bits, state.lencode[low].val);
if (++low == size) break;
putchar(',');
}
@@ -499,11 +519,6 @@ unsigned out;
bits -= bits & 7; \
} while (0)
-/* Reverse the bytes in a 32-bit value */
-#define REVERSE(q) \
- ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
- (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
-
/*
inflate() uses a state machine to process as much input data and generate as
much output data as possible before returning. The state machine is
@@ -797,7 +812,7 @@ int flush;
#endif
case DICTID:
NEEDBITS(32);
- strm->adler = state->check = REVERSE(hold);
+ strm->adler = state->check = ZSWAP32(hold);
INITBITS();
state->mode = DICT;
case DICT:
@@ -925,7 +940,6 @@ int flush;
PULLBYTE();
}
if (here.val < 16) {
- NEEDBITS(here.bits);
DROPBITS(here.bits);
state->lens[state->have++] = here.val;
}
@@ -1170,7 +1184,7 @@ int flush;
#ifdef GUNZIP
state->flags ? hold :
#endif
- REVERSE(hold)) != state->check) {
+ ZSWAP32(hold)) != state->check) {
strm->msg = (char *)"incorrect data check";
state->mode = BAD;
break;
@@ -1214,7 +1228,8 @@ int flush;
*/
inf_leave:
RESTORE();
- if (state->wsize || (state->mode < CHECK && out != strm->avail_out))
+ if (state->wsize || (out != strm->avail_out && state->mode < BAD &&
+ (state->mode < CHECK || flush != Z_FINISH)))
if (updatewindow(strm, out)) {
state->mode = MEM;
return Z_MEM_ERROR;
@@ -1255,7 +1270,10 @@ const Bytef *dictionary;
uInt dictLength;
{
struct inflate_state FAR *state;
- unsigned long id;
+ unsigned long dictid;
+ unsigned char *next;
+ unsigned avail;
+ int ret;
/* check state */
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
@@ -1263,29 +1281,27 @@ uInt dictLength;
if (state->wrap != 0 && state->mode != DICT)
return Z_STREAM_ERROR;
- /* check for correct dictionary id */
+ /* check for correct dictionary identifier */
if (state->mode == DICT) {
- id = adler32(0L, Z_NULL, 0);
- id = adler32(id, dictionary, dictLength);
- if (id != state->check)
+ dictid = adler32(0L, Z_NULL, 0);
+ dictid = adler32(dictid, dictionary, dictLength);
+ if (dictid != state->check)
return Z_DATA_ERROR;
}
- /* copy dictionary to window */
- if (updatewindow(strm, strm->avail_out)) {
+ /* copy dictionary to window using updatewindow(), which will amend the
+ existing dictionary if appropriate */
+ next = strm->next_out;
+ avail = strm->avail_out;
+ strm->next_out = (Bytef *)dictionary + dictLength;
+ strm->avail_out = 0;
+ ret = updatewindow(strm, dictLength);
+ strm->avail_out = avail;
+ strm->next_out = next;
+ if (ret) {
state->mode = MEM;
return Z_MEM_ERROR;
}
- if (dictLength > state->wsize) {
- zmemcpy(state->window, dictionary + dictLength - state->wsize,
- state->wsize);
- state->whave = state->wsize;
- }
- else {
- zmemcpy(state->window + state->wsize - dictLength, dictionary,
- dictLength);
- state->whave = dictLength;
- }
state->havedict = 1;
Tracev((stderr, "inflate: dictionary set\n"));
return Z_OK;
@@ -1433,8 +1449,8 @@ z_streamp source;
}
/* copy state */
- zmemcpy(dest, source, sizeof(z_stream));
- zmemcpy(copy, state, sizeof(struct inflate_state));
+ zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream));
+ zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state));
if (state->lencode >= state->codes &&
state->lencode <= state->codes + ENOUGH - 1) {
copy->lencode = copy->codes + (state->lencode - state->codes);
diff --git a/lib/libz/inftrees.c b/lib/libz/inftrees.c
index 11e9c52..abcd7c4 100644
--- a/lib/libz/inftrees.c
+++ b/lib/libz/inftrees.c
@@ -1,5 +1,5 @@
/* inftrees.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2010 Mark Adler
+ * Copyright (C) 1995-2012 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -9,7 +9,7 @@
#define MAXBITS 15
const char inflate_copyright[] =
- " inflate 1.2.5 Copyright 1995-2010 Mark Adler ";
+ " inflate 1.2.7 Copyright 1995-2012 Mark Adler ";
/*
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
@@ -62,7 +62,7 @@ unsigned short FAR *work;
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
- 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 73, 195};
+ 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 78, 68};
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
@@ -289,38 +289,14 @@ unsigned short FAR *work;
}
}
- /*
- Fill in rest of table for incomplete codes. This loop is similar to the
- loop above in incrementing huff for table indices. It is assumed that
- len is equal to curr + drop, so there is no loop needed to increment
- through high index bits. When the current sub-table is filled, the loop
- drops back to the root table to fill in any remaining entries there.
- */
- here.op = (unsigned char)64; /* invalid code marker */
- here.bits = (unsigned char)(len - drop);
- here.val = (unsigned short)0;
- while (huff != 0) {
- /* when done with sub-table, drop back to root table */
- if (drop != 0 && (huff & mask) != low) {
- drop = 0;
- len = root;
- next = *table;
- here.bits = (unsigned char)len;
- }
-
- /* put invalid code marker in table */
- next[huff >> drop] = here;
-
- /* backwards increment the len-bit code huff */
- incr = 1U << (len - 1);
- while (huff & incr)
- incr >>= 1;
- if (incr != 0) {
- huff &= incr - 1;
- huff += incr;
- }
- else
- huff = 0;
+ /* fill in remaining table entry if code is incomplete (guaranteed to have
+ at most one remaining entry, since if the code is incomplete, the
+ maximum code length that was allowed to get this far is one bit) */
+ if (huff != 0) {
+ here.op = (unsigned char)64; /* invalid code marker */
+ here.bits = (unsigned char)(len - drop);
+ here.val = (unsigned short)0;
+ next[huff] = here;
}
/* set return parameters */
diff --git a/lib/libz/example.c b/lib/libz/test/example.c
index 604736f..f515a48 100644
--- a/lib/libz/example.c
+++ b/lib/libz/test/example.c
@@ -1,5 +1,5 @@
/* example.c -- usage example of the zlib compression library
- * Copyright (C) 1995-2006 Jean-loup Gailly.
+ * Copyright (C) 1995-2006, 2011 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -34,10 +34,6 @@ const char hello[] = "hello, hello!";
const char dictionary[] = "hello";
uLong dictId; /* Adler32 value of the dictionary */
-void test_compress OF((Byte *compr, uLong comprLen,
- Byte *uncompr, uLong uncomprLen));
-void test_gzio OF((const char *fname,
- Byte *uncompr, uLong uncomprLen));
void test_deflate OF((Byte *compr, uLong comprLen));
void test_inflate OF((Byte *compr, uLong comprLen,
Byte *uncompr, uLong uncomprLen));
@@ -53,6 +49,39 @@ void test_dict_inflate OF((Byte *compr, uLong comprLen,
Byte *uncompr, uLong uncomprLen));
int main OF((int argc, char *argv[]));
+
+#ifdef Z_SOLO
+
+void *myalloc OF((void *, unsigned, unsigned));
+void myfree OF((void *, void *));
+
+void *myalloc(q, n, m)
+ void *q;
+ unsigned n, m;
+{
+ q = Z_NULL;
+ return calloc(n, m);
+}
+
+void myfree(void *q, void *p)
+{
+ q = Z_NULL;
+ free(p);
+}
+
+static alloc_func zalloc = myalloc;
+static free_func zfree = myfree;
+
+#else /* !Z_SOLO */
+
+static alloc_func zalloc = (alloc_func)0;
+static free_func zfree = (free_func)0;
+
+void test_compress OF((Byte *compr, uLong comprLen,
+ Byte *uncompr, uLong uncomprLen));
+void test_gzio OF((const char *fname,
+ Byte *uncompr, uLong uncomprLen));
+
/* ===========================================================================
* Test compress() and uncompress()
*/
@@ -163,6 +192,8 @@ void test_gzio(fname, uncompr, uncomprLen)
#endif
}
+#endif /* Z_SOLO */
+
/* ===========================================================================
* Test deflate() with small buffers
*/
@@ -174,8 +205,8 @@ void test_deflate(compr, comprLen)
int err;
uLong len = (uLong)strlen(hello)+1;
- c_stream.zalloc = (alloc_func)0;
- c_stream.zfree = (free_func)0;
+ c_stream.zalloc = zalloc;
+ c_stream.zfree = zfree;
c_stream.opaque = (voidpf)0;
err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
@@ -213,8 +244,8 @@ void test_inflate(compr, comprLen, uncompr, uncomprLen)
strcpy((char*)uncompr, "garbage");
- d_stream.zalloc = (alloc_func)0;
- d_stream.zfree = (free_func)0;
+ d_stream.zalloc = zalloc;
+ d_stream.zfree = zfree;
d_stream.opaque = (voidpf)0;
d_stream.next_in = compr;
@@ -252,8 +283,8 @@ void test_large_deflate(compr, comprLen, uncompr, uncomprLen)
z_stream c_stream; /* compression stream */
int err;
- c_stream.zalloc = (alloc_func)0;
- c_stream.zfree = (free_func)0;
+ c_stream.zalloc = zalloc;
+ c_stream.zfree = zfree;
c_stream.opaque = (voidpf)0;
err = deflateInit(&c_stream, Z_BEST_SPEED);
@@ -309,8 +340,8 @@ void test_large_inflate(compr, comprLen, uncompr, uncomprLen)
strcpy((char*)uncompr, "garbage");
- d_stream.zalloc = (alloc_func)0;
- d_stream.zfree = (free_func)0;
+ d_stream.zalloc = zalloc;
+ d_stream.zfree = zfree;
d_stream.opaque = (voidpf)0;
d_stream.next_in = compr;
@@ -349,8 +380,8 @@ void test_flush(compr, comprLen)
int err;
uInt len = (uInt)strlen(hello)+1;
- c_stream.zalloc = (alloc_func)0;
- c_stream.zfree = (free_func)0;
+ c_stream.zalloc = zalloc;
+ c_stream.zfree = zfree;
c_stream.opaque = (voidpf)0;
err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
@@ -388,8 +419,8 @@ void test_sync(compr, comprLen, uncompr, uncomprLen)
strcpy((char*)uncompr, "garbage");
- d_stream.zalloc = (alloc_func)0;
- d_stream.zfree = (free_func)0;
+ d_stream.zalloc = zalloc;
+ d_stream.zfree = zfree;
d_stream.opaque = (voidpf)0;
d_stream.next_in = compr;
@@ -430,15 +461,15 @@ void test_dict_deflate(compr, comprLen)
z_stream c_stream; /* compression stream */
int err;
- c_stream.zalloc = (alloc_func)0;
- c_stream.zfree = (free_func)0;
+ c_stream.zalloc = zalloc;
+ c_stream.zfree = zfree;
c_stream.opaque = (voidpf)0;
err = deflateInit(&c_stream, Z_BEST_COMPRESSION);
CHECK_ERR(err, "deflateInit");
err = deflateSetDictionary(&c_stream,
- (const Bytef*)dictionary, sizeof(dictionary));
+ (const Bytef*)dictionary, (int)sizeof(dictionary));
CHECK_ERR(err, "deflateSetDictionary");
dictId = c_stream.adler;
@@ -469,8 +500,8 @@ void test_dict_inflate(compr, comprLen, uncompr, uncomprLen)
strcpy((char*)uncompr, "garbage");
- d_stream.zalloc = (alloc_func)0;
- d_stream.zfree = (free_func)0;
+ d_stream.zalloc = zalloc;
+ d_stream.zfree = zfree;
d_stream.opaque = (voidpf)0;
d_stream.next_in = compr;
@@ -491,7 +522,7 @@ void test_dict_inflate(compr, comprLen, uncompr, uncomprLen)
exit(1);
}
err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary,
- sizeof(dictionary));
+ (int)sizeof(dictionary));
}
CHECK_ERR(err, "inflate with dict");
}
@@ -540,10 +571,15 @@ int main(argc, argv)
printf("out of memory\n");
exit(1);
}
+
+#ifdef Z_SOLO
+ argc = strlen(argv[0]);
+#else
test_compress(compr, comprLen, uncompr, uncomprLen);
test_gzio((argc > 1 ? argv[1] : TESTFILE),
uncompr, uncomprLen);
+#endif
test_deflate(compr, comprLen);
test_inflate(compr, comprLen, uncompr, uncomprLen);
diff --git a/lib/libz/test/infcover.c b/lib/libz/test/infcover.c
new file mode 100644
index 0000000..fe3d920
--- /dev/null
+++ b/lib/libz/test/infcover.c
@@ -0,0 +1,671 @@
+/* infcover.c -- test zlib's inflate routines with full code coverage
+ * Copyright (C) 2011 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* to use, do: ./configure --cover && make cover */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include "zlib.h"
+
+/* get definition of internal structure so we can mess with it (see pull()),
+ and so we can call inflate_trees() (see cover5()) */
+#define ZLIB_INTERNAL
+#include "inftrees.h"
+#include "inflate.h"
+
+#define local static
+
+/* -- memory tracking routines -- */
+
+/*
+ These memory tracking routines are provided to zlib and track all of zlib's
+ allocations and deallocations, check for LIFO operations, keep a current
+ and high water mark of total bytes requested, optionally set a limit on the
+ total memory that can be allocated, and when done check for memory leaks.
+
+ They are used as follows:
+
+ z_stream strm;
+ mem_setup(&strm) initializes the memory tracking and sets the
+ zalloc, zfree, and opaque members of strm to use
+ memory tracking for all zlib operations on strm
+ mem_limit(&strm, limit) sets a limit on the total bytes requested -- a
+ request that exceeds this limit will result in an
+ allocation failure (returns NULL) -- setting the
+ limit to zero means no limit, which is the default
+ after mem_setup()
+ mem_used(&strm, "msg") prints to stderr "msg" and the total bytes used
+ mem_high(&strm, "msg") prints to stderr "msg" and the high water mark
+ mem_done(&strm, "msg") ends memory tracking, releases all allocations
+ for the tracking as well as leaked zlib blocks, if
+ any. If there was anything unusual, such as leaked
+ blocks, non-FIFO frees, or frees of addresses not
+ allocated, then "msg" and information about the
+ problem is printed to stderr. If everything is
+ normal, nothing is printed. mem_done resets the
+ strm members to Z_NULL to use the default memory
+ allocation routines on the next zlib initialization
+ using strm.
+ */
+
+/* these items are strung together in a linked list, one for each allocation */
+struct mem_item {
+ void *ptr; /* pointer to allocated memory */
+ size_t size; /* requested size of allocation */
+ struct mem_item *next; /* pointer to next item in list, or NULL */
+};
+
+/* this structure is at the root of the linked list, and tracks statistics */
+struct mem_zone {
+ struct mem_item *first; /* pointer to first item in list, or NULL */
+ size_t total, highwater; /* total allocations, and largest total */
+ size_t limit; /* memory allocation limit, or 0 if no limit */
+ int notlifo, rogue; /* counts of non-LIFO frees and rogue frees */
+};
+
+/* memory allocation routine to pass to zlib */
+local void *mem_alloc(void *mem, unsigned count, unsigned size)
+{
+ void *ptr;
+ struct mem_item *item;
+ struct mem_zone *zone = mem;
+ size_t len = count * (size_t)size;
+
+ /* induced allocation failure */
+ if (zone == NULL || (zone->limit && zone->total + len > zone->limit))
+ return NULL;
+
+ /* perform allocation using the standard library, fill memory with a
+ non-zero value to make sure that the code isn't depending on zeros */
+ ptr = malloc(len);
+ if (ptr == NULL)
+ return NULL;
+ memset(ptr, 0xa5, len);
+
+ /* create a new item for the list */
+ item = malloc(sizeof(struct mem_item));
+ if (item == NULL) {
+ free(ptr);
+ return NULL;
+ }
+ item->ptr = ptr;
+ item->size = len;
+
+ /* insert item at the beginning of the list */
+ item->next = zone->first;
+ zone->first = item;
+
+ /* update the statistics */
+ zone->total += item->size;
+ if (zone->total > zone->highwater)
+ zone->highwater = zone->total;
+
+ /* return the allocated memory */
+ return ptr;
+}
+
+/* memory free routine to pass to zlib */
+local void mem_free(void *mem, void *ptr)
+{
+ struct mem_item *item, *next;
+ struct mem_zone *zone = mem;
+
+ /* if no zone, just do a free */
+ if (zone == NULL) {
+ free(ptr);
+ return;
+ }
+
+ /* point next to the item that matches ptr, or NULL if not found -- remove
+ the item from the linked list if found */
+ next = zone->first;
+ if (next) {
+ if (next->ptr == ptr)
+ zone->first = next->next; /* first one is it, remove from list */
+ else {
+ do { /* search the linked list */
+ item = next;
+ next = item->next;
+ } while (next != NULL && next->ptr != ptr);
+ if (next) { /* if found, remove from linked list */
+ item->next = next->next;
+ zone->notlifo++; /* not a LIFO free */
+ }
+
+ }
+ }
+
+ /* if found, update the statistics and free the item */
+ if (next) {
+ zone->total -= next->size;
+ free(next);
+ }
+
+ /* if not found, update the rogue count */
+ else
+ zone->rogue++;
+
+ /* in any case, do the requested free with the standard library function */
+ free(ptr);
+}
+
+/* set up a controlled memory allocation space for monitoring, set the stream
+ parameters to the controlled routines, with opaque pointing to the space */
+local void mem_setup(z_stream *strm)
+{
+ struct mem_zone *zone;
+
+ zone = malloc(sizeof(struct mem_zone));
+ assert(zone != NULL);
+ zone->first = NULL;
+ zone->total = 0;
+ zone->highwater = 0;
+ zone->limit = 0;
+ zone->notlifo = 0;
+ zone->rogue = 0;
+ strm->opaque = zone;
+ strm->zalloc = mem_alloc;
+ strm->zfree = mem_free;
+}
+
+/* set a limit on the total memory allocation, or 0 to remove the limit */
+local void mem_limit(z_stream *strm, size_t limit)
+{
+ struct mem_zone *zone = strm->opaque;
+
+ zone->limit = limit;
+}
+
+/* show the current total requested allocations in bytes */
+local void mem_used(z_stream *strm, char *prefix)
+{
+ struct mem_zone *zone = strm->opaque;
+
+ fprintf(stderr, "%s: %lu allocated\n", prefix, zone->total);
+}
+
+/* show the high water allocation in bytes */
+local void mem_high(z_stream *strm, char *prefix)
+{
+ struct mem_zone *zone = strm->opaque;
+
+ fprintf(stderr, "%s: %lu high water mark\n", prefix, zone->highwater);
+}
+
+/* release the memory allocation zone -- if there are any surprises, notify */
+local void mem_done(z_stream *strm, char *prefix)
+{
+ int count = 0;
+ struct mem_item *item, *next;
+ struct mem_zone *zone = strm->opaque;
+
+ /* show high water mark */
+ mem_high(strm, prefix);
+
+ /* free leftover allocations and item structures, if any */
+ item = zone->first;
+ while (item != NULL) {
+ free(item->ptr);
+ next = item->next;
+ free(item);
+ item = next;
+ count++;
+ }
+
+ /* issue alerts about anything unexpected */
+ if (count || zone->total)
+ fprintf(stderr, "** %s: %lu bytes in %d blocks not freed\n",
+ prefix, zone->total, count);
+ if (zone->notlifo)
+ fprintf(stderr, "** %s: %d frees not LIFO\n", prefix, zone->notlifo);
+ if (zone->rogue)
+ fprintf(stderr, "** %s: %d frees not recognized\n",
+ prefix, zone->rogue);
+
+ /* free the zone and delete from the stream */
+ free(zone);
+ strm->opaque = Z_NULL;
+ strm->zalloc = Z_NULL;
+ strm->zfree = Z_NULL;
+}
+
+/* -- inflate test routines -- */
+
+/* Decode a hexadecimal string, set *len to length, in[] to the bytes. This
+ decodes liberally, in that hex digits can be adjacent, in which case two in
+ a row writes a byte. Or they can delimited by any non-hex character, where
+ the delimiters are ignored except when a single hex digit is followed by a
+ delimiter in which case that single digit writes a byte. The returned
+ data is allocated and must eventually be freed. NULL is returned if out of
+ memory. If the length is not needed, then len can be NULL. */
+local unsigned char *h2b(const char *hex, unsigned *len)
+{
+ unsigned char *in;
+ unsigned next, val;
+
+ in = malloc((strlen(hex) + 1) >> 1);
+ if (in == NULL)
+ return NULL;
+ next = 0;
+ val = 1;
+ do {
+ if (*hex >= '0' && *hex <= '9')
+ val = (val << 4) + *hex - '0';
+ else if (*hex >= 'A' && *hex <= 'F')
+ val = (val << 4) + *hex - 'A' + 10;
+ else if (*hex >= 'a' && *hex <= 'f')
+ val = (val << 4) + *hex - 'a' + 10;
+ else if (val != 1 && val < 32) /* one digit followed by delimiter */
+ val += 240; /* make it look like two digits */
+ if (val > 255) { /* have two digits */
+ in[next++] = val & 0xff; /* save the decoded byte */
+ val = 1; /* start over */
+ }
+ } while (*hex++); /* go through the loop with the terminating null */
+ if (len != NULL)
+ *len = next;
+ in = reallocf(in, next);
+ return in;
+}
+
+/* generic inflate() run, where hex is the hexadecimal input data, what is the
+ text to include in an error message, step is how much input data to feed
+ inflate() on each call, or zero to feed it all, win is the window bits
+ parameter to inflateInit2(), len is the size of the output buffer, and err
+ is the error code expected from the first inflate() call (the second
+ inflate() call is expected to return Z_STREAM_END). If win is 47, then
+ header information is collected with inflateGetHeader(). If a zlib stream
+ is looking for a dictionary, then an empty dictionary is provided.
+ inflate() is run until all of the input data is consumed. */
+local void inf(char *hex, char *what, unsigned step, int win, unsigned len,
+ int err)
+{
+ int ret;
+ unsigned have;
+ unsigned char *in, *out;
+ z_stream strm, copy;
+ gz_header head;
+
+ mem_setup(&strm);
+ strm.avail_in = 0;
+ strm.next_in = Z_NULL;
+ ret = inflateInit2(&strm, win);
+ if (ret != Z_OK) {
+ mem_done(&strm, what);
+ return;
+ }
+ out = malloc(len); assert(out != NULL);
+ if (win == 47) {
+ head.extra = out;
+ head.extra_max = len;
+ head.name = out;
+ head.name_max = len;
+ head.comment = out;
+ head.comm_max = len;
+ ret = inflateGetHeader(&strm, &head); assert(ret == Z_OK);
+ }
+ in = h2b(hex, &have); assert(in != NULL);
+ if (step == 0 || step > have)
+ step = have;
+ strm.avail_in = step;
+ have -= step;
+ strm.next_in = in;
+ do {
+ strm.avail_out = len;
+ strm.next_out = out;
+ ret = inflate(&strm, Z_NO_FLUSH); assert(err == 9 || ret == err);
+ if (ret != Z_OK && ret != Z_BUF_ERROR && ret != Z_NEED_DICT)
+ break;
+ if (ret == Z_NEED_DICT) {
+ ret = inflateSetDictionary(&strm, in, 1);
+ assert(ret == Z_DATA_ERROR);
+ mem_limit(&strm, 1);
+ ret = inflateSetDictionary(&strm, out, 0);
+ assert(ret == Z_MEM_ERROR);
+ mem_limit(&strm, 0);
+ ((struct inflate_state *)strm.state)->mode = DICT;
+ ret = inflateSetDictionary(&strm, out, 0);
+ assert(ret == Z_OK);
+ ret = inflate(&strm, Z_NO_FLUSH); assert(ret == Z_BUF_ERROR);
+ }
+ ret = inflateCopy(&copy, &strm); assert(ret == Z_OK);
+ ret = inflateEnd(&copy); assert(ret == Z_OK);
+ err = 9; /* don't care next time around */
+ have += strm.avail_in;
+ strm.avail_in = step > have ? have : step;
+ have -= strm.avail_in;
+ } while (strm.avail_in);
+ free(in);
+ free(out);
+ ret = inflateReset2(&strm, -8); assert(ret == Z_OK);
+ ret = inflateEnd(&strm); assert(ret == Z_OK);
+ mem_done(&strm, what);
+}
+
+/* cover all of the lines in inflate.c up to inflate() */
+local void cover_support(void)
+{
+ int ret;
+ z_stream strm;
+
+ mem_setup(&strm);
+ strm.avail_in = 0;
+ strm.next_in = Z_NULL;
+ ret = inflateInit(&strm); assert(ret == Z_OK);
+ mem_used(&strm, "inflate init");
+ ret = inflatePrime(&strm, 5, 31); assert(ret == Z_OK);
+ ret = inflatePrime(&strm, -1, 0); assert(ret == Z_OK);
+ ret = inflateSetDictionary(&strm, Z_NULL, 0);
+ assert(ret == Z_STREAM_ERROR);
+ ret = inflateEnd(&strm); assert(ret == Z_OK);
+ mem_done(&strm, "prime");
+
+ inf("63 0", "force window allocation", 0, -15, 1, Z_OK);
+ inf("63 18 5", "force window replacement", 0, -8, 259, Z_OK);
+ inf("63 18 68 30 d0 0 0", "force split window update", 4, -8, 259, Z_OK);
+ inf("3 0", "use fixed blocks", 0, -15, 1, Z_STREAM_END);
+ inf("", "bad window size", 0, 1, 0, Z_STREAM_ERROR);
+
+ mem_setup(&strm);
+ strm.avail_in = 0;
+ strm.next_in = Z_NULL;
+ ret = inflateInit_(&strm, ZLIB_VERSION - 1, (int)sizeof(z_stream));
+ assert(ret == Z_VERSION_ERROR);
+ mem_done(&strm, "wrong version");
+
+ strm.avail_in = 0;
+ strm.next_in = Z_NULL;
+ ret = inflateInit(&strm); assert(ret == Z_OK);
+ ret = inflateEnd(&strm); assert(ret == Z_OK);
+ fputs("inflate built-in memory routines\n", stderr);
+}
+
+/* cover all inflate() header and trailer cases and code after inflate() */
+local void cover_wrap(void)
+{
+ int ret;
+ z_stream strm, copy;
+ unsigned char dict[257];
+
+ ret = inflate(Z_NULL, 0); assert(ret == Z_STREAM_ERROR);
+ ret = inflateEnd(Z_NULL); assert(ret == Z_STREAM_ERROR);
+ ret = inflateCopy(Z_NULL, Z_NULL); assert(ret == Z_STREAM_ERROR);
+ fputs("inflate bad parameters\n", stderr);
+
+ inf("1f 8b 0 0", "bad gzip method", 0, 31, 0, Z_DATA_ERROR);
+ inf("1f 8b 8 80", "bad gzip flags", 0, 31, 0, Z_DATA_ERROR);
+ inf("77 85", "bad zlib method", 0, 15, 0, Z_DATA_ERROR);
+ inf("8 99", "set window size from header", 0, 0, 0, Z_OK);
+ inf("78 9c", "bad zlib window size", 0, 8, 0, Z_DATA_ERROR);
+ inf("78 9c 63 0 0 0 1 0 1", "check adler32", 0, 15, 1, Z_STREAM_END);
+ inf("1f 8b 8 1e 0 0 0 0 0 0 1 0 0 0 0 0 0", "bad header crc", 0, 47, 1,
+ Z_DATA_ERROR);
+ inf("1f 8b 8 2 0 0 0 0 0 0 1d 26 3 0 0 0 0 0 0 0 0 0", "check gzip length",
+ 0, 47, 0, Z_STREAM_END);
+ inf("78 90", "bad zlib header check", 0, 47, 0, Z_DATA_ERROR);
+ inf("8 b8 0 0 0 1", "need dictionary", 0, 8, 0, Z_NEED_DICT);
+ inf("78 9c 63 0", "compute adler32", 0, 15, 1, Z_OK);
+
+ mem_setup(&strm);
+ strm.avail_in = 0;
+ strm.next_in = Z_NULL;
+ ret = inflateInit2(&strm, -8);
+ strm.avail_in = 2;
+ strm.next_in = (void *)"\x63";
+ strm.avail_out = 1;
+ strm.next_out = (void *)&ret;
+ mem_limit(&strm, 1);
+ ret = inflate(&strm, Z_NO_FLUSH); assert(ret == Z_MEM_ERROR);
+ ret = inflate(&strm, Z_NO_FLUSH); assert(ret == Z_MEM_ERROR);
+ mem_limit(&strm, 0);
+ memset(dict, 0, 257);
+ ret = inflateSetDictionary(&strm, dict, 257);
+ assert(ret == Z_OK);
+ mem_limit(&strm, (sizeof(struct inflate_state) << 1) + 256);
+ ret = inflatePrime(&strm, 16, 0); assert(ret == Z_OK);
+ strm.avail_in = 2;
+ strm.next_in = (void *)"\x80";
+ ret = inflateSync(&strm); assert(ret == Z_DATA_ERROR);
+ ret = inflate(&strm, Z_NO_FLUSH); assert(ret == Z_STREAM_ERROR);
+ strm.avail_in = 4;
+ strm.next_in = (void *)"\0\0\xff\xff";
+ ret = inflateSync(&strm); assert(ret == Z_OK);
+ (void)inflateSyncPoint(&strm);
+ ret = inflateCopy(&copy, &strm); assert(ret == Z_MEM_ERROR);
+ mem_limit(&strm, 0);
+ ret = inflateUndermine(&strm, 1); assert(ret == Z_DATA_ERROR);
+ (void)inflateMark(&strm);
+ ret = inflateEnd(&strm); assert(ret == Z_OK);
+ mem_done(&strm, "miscellaneous, force memory errors");
+}
+
+/* input and output functions for inflateBack() */
+local unsigned pull(void *desc, unsigned char **buf)
+{
+ static unsigned int next = 0;
+ static unsigned char dat[] = {0x63, 0, 2, 0};
+ struct inflate_state *state;
+
+ if (desc == Z_NULL) {
+ next = 0;
+ return 0; /* no input (already provided at next_in) */
+ }
+ state = (void *)((z_stream *)desc)->state;
+ if (state != Z_NULL)
+ state->mode = SYNC; /* force an otherwise impossible situation */
+ return next < sizeof(dat) ? (*buf = dat + next++, 1) : 0;
+}
+
+local int push(void *desc, unsigned char *buf, unsigned len)
+{
+ buf += len;
+ return desc != Z_NULL; /* force error if desc not null */
+}
+
+/* cover inflateBack() up to common deflate data cases and after those */
+local void cover_back(void)
+{
+ int ret;
+ z_stream strm;
+ unsigned char win[32768];
+
+ ret = inflateBackInit_(Z_NULL, 0, win, 0, 0);
+ assert(ret == Z_VERSION_ERROR);
+ ret = inflateBackInit(Z_NULL, 0, win); assert(ret == Z_STREAM_ERROR);
+ ret = inflateBack(Z_NULL, Z_NULL, Z_NULL, Z_NULL, Z_NULL);
+ assert(ret == Z_STREAM_ERROR);
+ ret = inflateBackEnd(Z_NULL); assert(ret == Z_STREAM_ERROR);
+ fputs("inflateBack bad parameters\n", stderr);
+
+ mem_setup(&strm);
+ ret = inflateBackInit(&strm, 15, win); assert(ret == Z_OK);
+ strm.avail_in = 2;
+ strm.next_in = (void *)"\x03";
+ ret = inflateBack(&strm, pull, Z_NULL, push, Z_NULL);
+ assert(ret == Z_STREAM_END);
+ /* force output error */
+ strm.avail_in = 3;
+ strm.next_in = (void *)"\x63\x00";
+ ret = inflateBack(&strm, pull, Z_NULL, push, &strm);
+ assert(ret == Z_BUF_ERROR);
+ /* force mode error by mucking with state */
+ ret = inflateBack(&strm, pull, &strm, push, Z_NULL);
+ assert(ret == Z_STREAM_ERROR);
+ ret = inflateBackEnd(&strm); assert(ret == Z_OK);
+ mem_done(&strm, "inflateBack bad state");
+
+ ret = inflateBackInit(&strm, 15, win); assert(ret == Z_OK);
+ ret = inflateBackEnd(&strm); assert(ret == Z_OK);
+ fputs("inflateBack built-in memory routines\n", stderr);
+}
+
+/* do a raw inflate of data in hexadecimal with both inflate and inflateBack */
+local int try(char *hex, char *id, int err)
+{
+ int ret;
+ unsigned len, size;
+ unsigned char *in, *out, *win;
+ char *prefix;
+ z_stream strm;
+
+ /* convert to hex */
+ in = h2b(hex, &len);
+ assert(in != NULL);
+
+ /* allocate work areas */
+ size = len << 3;
+ out = malloc(size);
+ assert(out != NULL);
+ win = malloc(32768);
+ assert(win != NULL);
+ prefix = malloc(strlen(id) + 6);
+ assert(prefix != NULL);
+
+ /* first with inflate */
+ strcpy(prefix, id);
+ strcat(prefix, "-late");
+ mem_setup(&strm);
+ strm.avail_in = 0;
+ strm.next_in = Z_NULL;
+ ret = inflateInit2(&strm, err < 0 ? 47 : -15);
+ assert(ret == Z_OK);
+ strm.avail_in = len;
+ strm.next_in = in;
+ do {
+ strm.avail_out = size;
+ strm.next_out = out;
+ ret = inflate(&strm, Z_TREES);
+ assert(ret != Z_STREAM_ERROR && ret != Z_MEM_ERROR);
+ if (ret == Z_DATA_ERROR || ret == Z_NEED_DICT)
+ break;
+ } while (strm.avail_in || strm.avail_out == 0);
+ if (err) {
+ assert(ret == Z_DATA_ERROR);
+ assert(strcmp(id, strm.msg) == 0);
+ }
+ inflateEnd(&strm);
+ mem_done(&strm, prefix);
+
+ /* then with inflateBack */
+ if (err >= 0) {
+ strcpy(prefix, id);
+ strcat(prefix, "-back");
+ mem_setup(&strm);
+ ret = inflateBackInit(&strm, 15, win);
+ assert(ret == Z_OK);
+ strm.avail_in = len;
+ strm.next_in = in;
+ ret = inflateBack(&strm, pull, Z_NULL, push, Z_NULL);
+ assert(ret != Z_STREAM_ERROR);
+ if (err) {
+ assert(ret == Z_DATA_ERROR);
+ assert(strcmp(id, strm.msg) == 0);
+ }
+ inflateBackEnd(&strm);
+ mem_done(&strm, prefix);
+ }
+
+ /* clean up */
+ free(prefix);
+ free(win);
+ free(out);
+ free(in);
+ return ret;
+}
+
+/* cover deflate data cases in both inflate() and inflateBack() */
+local void cover_inflate(void)
+{
+ try("0 0 0 0 0", "invalid stored block lengths", 1);
+ try("3 0", "fixed", 0);
+ try("6", "invalid block type", 1);
+ try("1 1 0 fe ff 0", "stored", 0);
+ try("fc 0 0", "too many length or distance symbols", 1);
+ try("4 0 fe ff", "invalid code lengths set", 1);
+ try("4 0 24 49 0", "invalid bit length repeat", 1);
+ try("4 0 24 e9 ff ff", "invalid bit length repeat", 1);
+ try("4 0 24 e9 ff 6d", "invalid code -- missing end-of-block", 1);
+ try("4 80 49 92 24 49 92 24 71 ff ff 93 11 0",
+ "invalid literal/lengths set", 1);
+ try("4 80 49 92 24 49 92 24 f b4 ff ff c3 84", "invalid distances set", 1);
+ try("4 c0 81 8 0 0 0 0 20 7f eb b 0 0", "invalid literal/length code", 1);
+ try("2 7e ff ff", "invalid distance code", 1);
+ try("c c0 81 0 0 0 0 0 90 ff 6b 4 0", "invalid distance too far back", 1);
+
+ /* also trailer mismatch just in inflate() */
+ try("1f 8b 8 0 0 0 0 0 0 0 3 0 0 0 0 1", "incorrect data check", -1);
+ try("1f 8b 8 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 1",
+ "incorrect length check", -1);
+ try("5 c0 21 d 0 0 0 80 b0 fe 6d 2f 91 6c", "pull 17", 0);
+ try("5 e0 81 91 24 cb b2 2c 49 e2 f 2e 8b 9a 47 56 9f fb fe ec d2 ff 1f",
+ "long code", 0);
+ try("ed c0 1 1 0 0 0 40 20 ff 57 1b 42 2c 4f", "length extra", 0);
+ try("ed cf c1 b1 2c 47 10 c4 30 fa 6f 35 1d 1 82 59 3d fb be 2e 2a fc f c",
+ "long distance and extra", 0);
+ try("ed c0 81 0 0 0 0 80 a0 fd a9 17 a9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "
+ "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6", "window end", 0);
+ inf("2 8 20 80 0 3 0", "inflate_fast TYPE return", 0, -15, 258,
+ Z_STREAM_END);
+ inf("63 18 5 40 c 0", "window wrap", 3, -8, 300, Z_OK);
+}
+
+/* cover remaining lines in inftrees.c */
+local void cover_trees(void)
+{
+ int ret;
+ unsigned bits;
+ unsigned short lens[16], work[16];
+ code *next, table[ENOUGH_DISTS];
+
+ /* we need to call inflate_table() directly in order to manifest not-
+ enough errors, since zlib insures that enough is always enough */
+ for (bits = 0; bits < 15; bits++)
+ lens[bits] = (unsigned short)(bits + 1);
+ lens[15] = 15;
+ next = table;
+ bits = 15;
+ ret = inflate_table(DISTS, lens, 16, &next, &bits, work);
+ assert(ret == 1);
+ next = table;
+ bits = 1;
+ ret = inflate_table(DISTS, lens, 16, &next, &bits, work);
+ assert(ret == 1);
+ fputs("inflate_table not enough errors\n", stderr);
+}
+
+/* cover remaining inffast.c decoding and window copying */
+local void cover_fast(void)
+{
+ inf("e5 e0 81 ad 6d cb b2 2c c9 01 1e 59 63 ae 7d ee fb 4d fd b5 35 41 68"
+ " ff 7f 0f 0 0 0", "fast length extra bits", 0, -8, 258, Z_DATA_ERROR);
+ inf("25 fd 81 b5 6d 59 b6 6a 49 ea af 35 6 34 eb 8c b9 f6 b9 1e ef 67 49"
+ " 50 fe ff ff 3f 0 0", "fast distance extra bits", 0, -8, 258,
+ Z_DATA_ERROR);
+ inf("3 7e 0 0 0 0 0", "fast invalid distance code", 0, -8, 258,
+ Z_DATA_ERROR);
+ inf("1b 7 0 0 0 0 0", "fast invalid literal/length code", 0, -8, 258,
+ Z_DATA_ERROR);
+ inf("d c7 1 ae eb 38 c 4 41 a0 87 72 de df fb 1f b8 36 b1 38 5d ff ff 0",
+ "fast 2nd level codes and too far back", 0, -8, 258, Z_DATA_ERROR);
+ inf("63 18 5 8c 10 8 0 0 0 0", "very common case", 0, -8, 259, Z_OK);
+ inf("63 60 60 18 c9 0 8 18 18 18 26 c0 28 0 29 0 0 0",
+ "contiguous and wrap around window", 6, -8, 259, Z_OK);
+ inf("63 0 3 0 0 0 0 0", "copy direct from output", 0, -8, 259,
+ Z_STREAM_END);
+}
+
+int main(void)
+{
+ fprintf(stderr, "%s\n", zlibVersion());
+ cover_support();
+ cover_wrap();
+ cover_back();
+ cover_inflate();
+ cover_trees();
+ cover_fast();
+ return 0;
+}
diff --git a/lib/libz/minigzip.c b/lib/libz/test/minigzip.c
index 9825ccc..aa7ac7a 100644
--- a/lib/libz/minigzip.c
+++ b/lib/libz/test/minigzip.c
@@ -1,5 +1,5 @@
/* minigzip.c -- simulate gzip using the zlib compression library
- * Copyright (C) 1995-2006, 2010 Jean-loup Gailly.
+ * Copyright (C) 1995-2006, 2010, 2011 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -138,6 +138,197 @@ static void pwinerror (s)
# define local
#endif
+#ifdef Z_SOLO
+/* for Z_SOLO, create simplified gz* functions using deflate and inflate */
+
+#if defined(Z_HAVE_UNISTD_H) || defined(Z_LARGE)
+# include <unistd.h> /* for unlink() */
+#endif
+
+void *myalloc OF((void *, unsigned, unsigned));
+void myfree OF((void *, void *));
+
+void *myalloc(q, n, m)
+ void *q;
+ unsigned n, m;
+{
+ q = Z_NULL;
+ return calloc(n, m);
+}
+
+void myfree(q, p)
+ void *q, *p;
+{
+ q = Z_NULL;
+ free(p);
+}
+
+typedef struct gzFile_s {
+ FILE *file;
+ int write;
+ int err;
+ char *msg;
+ z_stream strm;
+} *gzFile;
+
+gzFile gzopen OF((const char *, const char *));
+gzFile gzdopen OF((int, const char *));
+gzFile gz_open OF((const char *, int, const char *));
+
+gzFile gzopen(path, mode)
+const char *path;
+const char *mode;
+{
+ return gz_open(path, -1, mode);
+}
+
+gzFile gzdopen(fd, mode)
+int fd;
+const char *mode;
+{
+ return gz_open(NULL, fd, mode);
+}
+
+gzFile gz_open(path, fd, mode)
+ const char *path;
+ int fd;
+ const char *mode;
+{
+ gzFile gz;
+ int ret;
+
+ gz = malloc(sizeof(struct gzFile_s));
+ if (gz == NULL)
+ return NULL;
+ gz->write = strchr(mode, 'w') != NULL;
+ gz->strm.zalloc = myalloc;
+ gz->strm.zfree = myfree;
+ gz->strm.opaque = Z_NULL;
+ if (gz->write)
+ ret = deflateInit2(&(gz->strm), -1, 8, 15 + 16, 8, 0);
+ else {
+ gz->strm.next_in = 0;
+ gz->strm.avail_in = Z_NULL;
+ ret = inflateInit2(&(gz->strm), 15 + 16);
+ }
+ if (ret != Z_OK) {
+ free(gz);
+ return NULL;
+ }
+ gz->file = path == NULL ? fdopen(fd, gz->write ? "wb" : "rb") :
+ fopen(path, gz->write ? "wb" : "rb");
+ if (gz->file == NULL) {
+ gz->write ? deflateEnd(&(gz->strm)) : inflateEnd(&(gz->strm));
+ free(gz);
+ return NULL;
+ }
+ gz->err = 0;
+ gz->msg = "";
+ return gz;
+}
+
+int gzwrite OF((gzFile, const void *, unsigned));
+
+int gzwrite(gz, buf, len)
+ gzFile gz;
+ const void *buf;
+ unsigned len;
+{
+ z_stream *strm;
+ unsigned char out[BUFLEN];
+
+ if (gz == NULL || !gz->write)
+ return 0;
+ strm = &(gz->strm);
+ strm->next_in = (void *)buf;
+ strm->avail_in = len;
+ do {
+ strm->next_out = out;
+ strm->avail_out = BUFLEN;
+ (void)deflate(strm, Z_NO_FLUSH);
+ fwrite(out, 1, BUFLEN - strm->avail_out, gz->file);
+ } while (strm->avail_out == 0);
+ return len;
+}
+
+int gzread OF((gzFile, void *, unsigned));
+
+int gzread(gz, buf, len)
+ gzFile gz;
+ void *buf;
+ unsigned len;
+{
+ int ret;
+ unsigned got;
+ unsigned char in[1];
+ z_stream *strm;
+
+ if (gz == NULL || gz->write)
+ return 0;
+ if (gz->err)
+ return 0;
+ strm = &(gz->strm);
+ strm->next_out = (void *)buf;
+ strm->avail_out = len;
+ do {
+ got = fread(in, 1, 1, gz->file);
+ if (got == 0)
+ break;
+ strm->next_in = in;
+ strm->avail_in = 1;
+ ret = inflate(strm, Z_NO_FLUSH);
+ if (ret == Z_DATA_ERROR) {
+ gz->err = Z_DATA_ERROR;
+ gz->msg = strm->msg;
+ return 0;
+ }
+ if (ret == Z_STREAM_END)
+ inflateReset(strm);
+ } while (strm->avail_out);
+ return len - strm->avail_out;
+}
+
+int gzclose OF((gzFile));
+
+int gzclose(gz)
+ gzFile gz;
+{
+ z_stream *strm;
+ unsigned char out[BUFLEN];
+
+ if (gz == NULL)
+ return Z_STREAM_ERROR;
+ strm = &(gz->strm);
+ if (gz->write) {
+ strm->next_in = Z_NULL;
+ strm->avail_in = 0;
+ do {
+ strm->next_out = out;
+ strm->avail_out = BUFLEN;
+ (void)deflate(strm, Z_FINISH);
+ fwrite(out, 1, BUFLEN - strm->avail_out, gz->file);
+ } while (strm->avail_out == 0);
+ deflateEnd(strm);
+ }
+ else
+ inflateEnd(strm);
+ fclose(gz->file);
+ free(gz);
+ return Z_OK;
+}
+
+const char *gzerror OF((gzFile, int *));
+
+const char *gzerror(gz, err)
+ gzFile gz;
+ int *err;
+{
+ *err = gz->err;
+ return gz->msg;
+}
+
+#endif
+
char *prog;
void error OF((const char *msg));
diff --git a/lib/libz/trees.c b/lib/libz/trees.c
index 56e9bb1..8c32b21 100644
--- a/lib/libz/trees.c
+++ b/lib/libz/trees.c
@@ -1,5 +1,5 @@
/* trees.c -- output deflated data using Huffman coding
- * Copyright (C) 1995-2010 Jean-loup Gailly
+ * Copyright (C) 1995-2012 Jean-loup Gailly
* detect_data_type() function provided freely by Cosmin Truta, 2006
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -74,11 +74,6 @@ local const uch bl_order[BL_CODES]
* probability, to avoid transmitting the lengths for unused bit length codes.
*/
-#define Buf_size (8 * 2*sizeof(char))
-/* Number of bits used within bi_buf. (bi_buf might be implemented on
- * more than 16 bits on some systems.)
- */
-
/* ===========================================================================
* Local data. These are initialized only once.
*/
@@ -399,7 +394,6 @@ void ZLIB_INTERNAL _tr_init(s)
s->bi_buf = 0;
s->bi_valid = 0;
- s->last_eob_len = 8; /* enough lookahead for inflate */
#ifdef DEBUG
s->compressed_len = 0L;
s->bits_sent = 0L;
@@ -883,15 +877,17 @@ void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last)
}
/* ===========================================================================
+ * Flush the bits in the bit buffer to pending output (leaves at most 7 bits)
+ */
+void ZLIB_INTERNAL _tr_flush_bits(s)
+ deflate_state *s;
+{
+ bi_flush(s);
+}
+
+/* ===========================================================================
* Send one empty static block to give enough lookahead for inflate.
* This takes 10 bits, of which 7 may remain in the bit buffer.
- * The current inflate code requires 9 bits of lookahead. If the
- * last two codes for the previous block (real code plus EOB) were coded
- * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode
- * the last real code. In this case we send two empty static blocks instead
- * of one. (There are no problems if the previous block is stored or fixed.)
- * To simplify the code, we assume the worst case of last real code encoded
- * on one bit only.
*/
void ZLIB_INTERNAL _tr_align(s)
deflate_state *s;
@@ -902,20 +898,6 @@ void ZLIB_INTERNAL _tr_align(s)
s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
#endif
bi_flush(s);
- /* Of the 10 bits for the empty block, we have already sent
- * (10 - bi_valid) bits. The lookahead for the last real code (before
- * the EOB of the previous block) was thus at least one plus the length
- * of the EOB plus what we have just sent of the empty static block.
- */
- if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {
- send_bits(s, STATIC_TREES<<1, 3);
- send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
- s->compressed_len += 10L;
-#endif
- bi_flush(s);
- }
- s->last_eob_len = 7;
}
/* ===========================================================================
@@ -1118,7 +1100,6 @@ local void compress_block(s, ltree, dtree)
} while (lx < s->last_lit);
send_code(s, END_BLOCK, ltree);
- s->last_eob_len = ltree[END_BLOCK].Len;
}
/* ===========================================================================
@@ -1226,7 +1207,6 @@ local void copy_block(s, buf, len, header)
int header; /* true if block header must be written */
{
bi_windup(s); /* align on byte boundary */
- s->last_eob_len = 8; /* enough lookahead for inflate */
if (header) {
put_short(s, (ush)len);
diff --git a/lib/libz/zconf.h b/lib/libz/zconf.h
index 4efd6b2..a6f6b7e 100644
--- a/lib/libz/zconf.h
+++ b/lib/libz/zconf.h
@@ -1,5 +1,5 @@
/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2010 Jean-loup Gailly.
+ * Copyright (C) 1995-2012 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -15,6 +15,7 @@
* this permanently in zconf.h using "./configure --zprefix".
*/
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
+# define Z_PREFIX_SET
/* all linked symbols */
# define _dist_code z__dist_code
@@ -27,9 +28,11 @@
# define adler32 z_adler32
# define adler32_combine z_adler32_combine
# define adler32_combine64 z_adler32_combine64
-# define compress z_compress
-# define compress2 z_compress2
-# define compressBound z_compressBound
+# ifndef Z_SOLO
+# define compress z_compress
+# define compress2 z_compress2
+# define compressBound z_compressBound
+# endif
# define crc32 z_crc32
# define crc32_combine z_crc32_combine
# define crc32_combine64 z_crc32_combine64
@@ -40,44 +43,52 @@
# define deflateInit2_ z_deflateInit2_
# define deflateInit_ z_deflateInit_
# define deflateParams z_deflateParams
+# define deflatePending z_deflatePending
# define deflatePrime z_deflatePrime
# define deflateReset z_deflateReset
+# define deflateResetKeep z_deflateResetKeep
# define deflateSetDictionary z_deflateSetDictionary
# define deflateSetHeader z_deflateSetHeader
# define deflateTune z_deflateTune
# define deflate_copyright z_deflate_copyright
# define get_crc_table z_get_crc_table
-# define gz_error z_gz_error
-# define gz_intmax z_gz_intmax
-# define gz_strwinerror z_gz_strwinerror
-# define gzbuffer z_gzbuffer
-# define gzclearerr z_gzclearerr
-# define gzclose z_gzclose
-# define gzclose_r z_gzclose_r
-# define gzclose_w z_gzclose_w
-# define gzdirect z_gzdirect
-# define gzdopen z_gzdopen
-# define gzeof z_gzeof
-# define gzerror z_gzerror
-# define gzflush z_gzflush
-# define gzgetc z_gzgetc
-# define gzgets z_gzgets
-# define gzoffset z_gzoffset
-# define gzoffset64 z_gzoffset64
-# define gzopen z_gzopen
-# define gzopen64 z_gzopen64
-# define gzprintf z_gzprintf
-# define gzputc z_gzputc
-# define gzputs z_gzputs
-# define gzread z_gzread
-# define gzrewind z_gzrewind
-# define gzseek z_gzseek
-# define gzseek64 z_gzseek64
-# define gzsetparams z_gzsetparams
-# define gztell z_gztell
-# define gztell64 z_gztell64
-# define gzungetc z_gzungetc
-# define gzwrite z_gzwrite
+# ifndef Z_SOLO
+# define gz_error z_gz_error
+# define gz_intmax z_gz_intmax
+# define gz_strwinerror z_gz_strwinerror
+# define gzbuffer z_gzbuffer
+# define gzclearerr z_gzclearerr
+# define gzclose z_gzclose
+# define gzclose_r z_gzclose_r
+# define gzclose_w z_gzclose_w
+# define gzdirect z_gzdirect
+# define gzdopen z_gzdopen
+# define gzeof z_gzeof
+# define gzerror z_gzerror
+# define gzflush z_gzflush
+# define gzgetc z_gzgetc
+# define gzgetc_ z_gzgetc_
+# define gzgets z_gzgets
+# define gzoffset z_gzoffset
+# define gzoffset64 z_gzoffset64
+# define gzopen z_gzopen
+# define gzopen64 z_gzopen64
+# ifdef _WIN32
+# define gzopen_w z_gzopen_w
+# endif
+# define gzprintf z_gzprintf
+# define gzputc z_gzputc
+# define gzputs z_gzputs
+# define gzread z_gzread
+# define gzrewind z_gzrewind
+# define gzseek z_gzseek
+# define gzseek64 z_gzseek64
+# define gzsetparams z_gzsetparams
+# define gztell z_gztell
+# define gztell64 z_gztell64
+# define gzungetc z_gzungetc
+# define gzwrite z_gzwrite
+# endif
# define inflate z_inflate
# define inflateBack z_inflateBack
# define inflateBackEnd z_inflateBackEnd
@@ -95,13 +106,18 @@
# define inflateSync z_inflateSync
# define inflateSyncPoint z_inflateSyncPoint
# define inflateUndermine z_inflateUndermine
+# define inflateResetKeep z_inflateResetKeep
# define inflate_copyright z_inflate_copyright
# define inflate_fast z_inflate_fast
# define inflate_table z_inflate_table
-# define uncompress z_uncompress
+# ifndef Z_SOLO
+# define uncompress z_uncompress
+# endif
# define zError z_zError
-# define zcalloc z_zcalloc
-# define zcfree z_zcfree
+# ifndef Z_SOLO
+# define zcalloc z_zcalloc
+# define zcfree z_zcfree
+# endif
# define zlibCompileFlags z_zlibCompileFlags
# define zlibVersion z_zlibVersion
@@ -111,7 +127,9 @@
# define alloc_func z_alloc_func
# define charf z_charf
# define free_func z_free_func
-# define gzFile z_gzFile
+# ifndef Z_SOLO
+# define gzFile z_gzFile
+# endif
# define gz_header z_gz_header
# define gz_headerp z_gz_headerp
# define in_func z_in_func
@@ -197,6 +215,12 @@
# endif
#endif
+#if defined(ZLIB_CONST) && !defined(z_const)
+# define z_const const
+#else
+# define z_const
+#endif
+
/* Some Mac compilers merge all .h files incorrectly: */
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
# define NO_DUMMY_DECL
@@ -243,6 +267,14 @@
# endif
#endif
+#ifndef Z_ARG /* function prototypes for stdarg */
+# if defined(STDC) || defined(Z_HAVE_STDARG_H)
+# define Z_ARG(args) args
+# else
+# define Z_ARG(args) ()
+# endif
+#endif
+
/* The following definitions for FAR are needed only for MSDOS mixed
* model programming (small or medium model with some far allocations).
* This was tested only with MSC; for other MSDOS compilers you may have
@@ -356,12 +388,45 @@ typedef uLong FAR uLongf;
typedef Byte *voidp;
#endif
+/* ./configure may #define Z_U4 here */
+
+#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
+# include <limits.h>
+# if (UINT_MAX == 0xffffffffUL)
+# define Z_U4 unsigned
+# else
+# if (ULONG_MAX == 0xffffffffUL)
+# define Z_U4 unsigned long
+# else
+# if (USHRT_MAX == 0xffffffffUL)
+# define Z_U4 unsigned short
+# endif
+# endif
+# endif
+#endif
+
+#ifdef Z_U4
+ typedef Z_U4 z_crc_t;
+#else
+ typedef unsigned long z_crc_t;
+#endif
+
#if 0 /* was set to #if 0 by ./configure */
# define Z_HAVE_UNISTD_H
#endif
+#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
+# define Z_HAVE_STDARG_H
+#endif
+
#ifdef STDC
-# include <sys/types.h> /* for off_t */
+# ifndef Z_SOLO
+# include <sys/types.h> /* for off_t */
+# endif
+#endif
+
+#ifdef _WIN32
+# include <stddef.h> /* for wchar_t */
#endif
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
@@ -370,21 +435,38 @@ typedef uLong FAR uLongf;
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
* equivalently requesting no 64-bit operations
*/
-#if -_LARGEFILE64_SOURCE - -1 == 1
+#if defined(LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
# undef _LARGEFILE64_SOURCE
#endif
-#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
-# include <unistd.h> /* for SEEK_* and off_t */
-# ifdef VMS
-# include <unixio.h> /* for off_t */
-# endif
-# ifndef z_off_t
-# define z_off_t off_t
+#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
+# define Z_HAVE_UNISTD_H
+#endif
+#ifndef Z_SOLO
+# if defined(Z_HAVE_UNISTD_H) || defined(LARGEFILE64_SOURCE)
+# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
+# ifdef VMS
+# include <unixio.h> /* for off_t */
+# endif
+# ifndef z_off_t
+# define z_off_t off_t
+# endif
# endif
#endif
-#ifndef SEEK_SET
+#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
+# define Z_LFS64
+#endif
+
+#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
+# define Z_LARGE64
+#endif
+
+#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
+# define Z_WANT64
+#endif
+
+#if !defined(SEEK_SET) && !defined(Z_SOLO)
# define SEEK_SET 0 /* Seek from beginning of file. */
# define SEEK_CUR 1 /* Seek from current position. */
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
@@ -402,18 +484,14 @@ typedef uLong FAR uLongf;
# define z_off_t long
#endif
-#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+#if !defined(_WIN32) && defined(Z_LARGE64)
# define z_off64_t off64_t
#else
-# define z_off64_t z_off_t
-#endif
-
-#if defined(__OS400__)
-# define NO_vsnprintf
-#endif
-
-#if defined(__MVS__)
-# define NO_vsnprintf
+# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
+# define z_off64_t __int64
+# else
+# define z_off64_t z_off_t
+# endif
#endif
/* MVS linker does not support external names larger than 8 bytes */
diff --git a/lib/libz/zlib.3 b/lib/libz/zlib.3
index 27adc4c..79d3402 100644
--- a/lib/libz/zlib.3
+++ b/lib/libz/zlib.3
@@ -1,4 +1,4 @@
-.TH ZLIB 3 "19 Apr 2010"
+.TH ZLIB 3 "2 May 2012"
.SH NAME
zlib \- compression/decompression library
.SH SYNOPSIS
@@ -36,9 +36,9 @@ All functions of the compression library are documented in the file
.IR zlib.h .
The distribution source includes examples of use of the library
in the files
-.I example.c
+.I test/example.c
and
-.IR minigzip.c,
+.IR test/minigzip.c,
as well as other examples in the
.IR examples/
directory.
@@ -65,7 +65,7 @@ A Python interface to
written by A.M. Kuchling (amk@magnet.com),
is available in Python 1.5 and later versions:
.IP
-http://www.python.org/doc/lib/module-zlib.html
+http://docs.python.org/library/zlib.html
.LP
.I zlib
is built into
@@ -95,11 +95,11 @@ http://zlib.net/
The data format used by the zlib library is described by RFC
(Request for Comments) 1950 to 1952 in the files:
.IP
-http://www.ietf.org/rfc/rfc1950.txt (for the zlib header and trailer format)
+http://tools.ietf.org/html/rfc1950 (for the zlib header and trailer format)
.br
-http://www.ietf.org/rfc/rfc1951.txt (for the deflate compressed data format)
+http://tools.ietf.org/html/rfc1951 (for the deflate compressed data format)
.br
-http://www.ietf.org/rfc/rfc1952.txt (for the gzip header and trailer format)
+http://tools.ietf.org/html/rfc1952 (for the gzip header and trailer format)
.LP
Mark Nelson wrote an article about
.I zlib
@@ -125,8 +125,8 @@ before asking for help.
Send questions and/or comments to zlib@gzip.org,
or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
.SH AUTHORS
-Version 1.2.5
-Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org)
+Version 1.2.7
+Copyright (C) 1995-2012 Jean-loup Gailly (jloup@gzip.org)
and Mark Adler (madler@alumni.caltech.edu).
.LP
This software is provided "as-is,"
diff --git a/lib/libz/zlib.h b/lib/libz/zlib.h
index bfbba83..3edf3ac 100644
--- a/lib/libz/zlib.h
+++ b/lib/libz/zlib.h
@@ -1,7 +1,7 @@
/* zlib.h -- interface of the 'zlib' general purpose compression library
- version 1.2.5, April 19th, 2010
+ version 1.2.7, May 2nd, 2012
- Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
+ Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -24,8 +24,8 @@
The data format used by the zlib library is described by RFCs (Request for
- Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
- (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
+ Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
+ (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
*/
#ifndef ZLIB_H
@@ -37,11 +37,11 @@
extern "C" {
#endif
-#define ZLIB_VERSION "1.2.5"
-#define ZLIB_VERNUM 0x1250
+#define ZLIB_VERSION "1.2.7"
+#define ZLIB_VERNUM 0x1270
#define ZLIB_VER_MAJOR 1
#define ZLIB_VER_MINOR 2
-#define ZLIB_VER_REVISION 5
+#define ZLIB_VER_REVISION 7
#define ZLIB_VER_SUBREVISION 0
/*
@@ -83,15 +83,15 @@ typedef void (*free_func) OF((voidpf opaque, voidpf address));
struct internal_state;
typedef struct z_stream_s {
- Bytef *next_in; /* next input byte */
+ z_const Bytef *next_in; /* next input byte */
uInt avail_in; /* number of bytes available at next_in */
- uLong total_in; /* total nb of input bytes read so far */
+ uLong total_in; /* total number of input bytes read so far */
Bytef *next_out; /* next output byte should be put there */
uInt avail_out; /* remaining free space at next_out */
- uLong total_out; /* total nb of bytes output so far */
+ uLong total_out; /* total number of bytes output so far */
- char *msg; /* last error message, NULL if no error */
+ z_const char *msg; /* last error message, NULL if no error */
struct internal_state FAR *state; /* not visible by applications */
alloc_func zalloc; /* used to allocate the internal state */
@@ -327,8 +327,9 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
Z_FINISH can be used immediately after deflateInit if all the compression
is to be done in a single step. In this case, avail_out must be at least the
- value returned by deflateBound (see below). If deflate does not return
- Z_STREAM_END, then it must be called again as described above.
+ value returned by deflateBound (see below). Then deflate is guaranteed to
+ return Z_STREAM_END. If not enough output space is provided, deflate will
+ not return Z_STREAM_END, and it must be called again as described above.
deflate() sets strm->adler to the adler32 checksum of all input read
so far (that is, total_in bytes).
@@ -451,23 +452,29 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
error. However if all decompression is to be performed in a single step (a
single call of inflate), the parameter flush should be set to Z_FINISH. In
this case all pending input is processed and all pending output is flushed;
- avail_out must be large enough to hold all the uncompressed data. (The size
- of the uncompressed data may have been saved by the compressor for this
- purpose.) The next operation on this stream must be inflateEnd to deallocate
- the decompression state. The use of Z_FINISH is never required, but can be
- used to inform inflate that a faster approach may be used for the single
- inflate() call.
+ avail_out must be large enough to hold all of the uncompressed data for the
+ operation to complete. (The size of the uncompressed data may have been
+ saved by the compressor for this purpose.) The use of Z_FINISH is not
+ required to perform an inflation in one step. However it may be used to
+ inform inflate that a faster approach can be used for the single inflate()
+ call. Z_FINISH also informs inflate to not maintain a sliding window if the
+ stream completes, which reduces inflate's memory footprint. If the stream
+ does not complete, either because not all of the stream is provided or not
+ enough output space is provided, then a sliding window will be allocated and
+ inflate() can be called again to continue the operation as if Z_NO_FLUSH had
+ been used.
In this implementation, inflate() always flushes as much output as
possible to the output buffer, and always uses the faster approach on the
- first call. So the only effect of the flush parameter in this implementation
- is on the return value of inflate(), as noted below, or when it returns early
- because Z_BLOCK or Z_TREES is used.
+ first call. So the effects of the flush parameter in this implementation are
+ on the return value of inflate() as noted below, when inflate() returns early
+ when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of
+ memory for a sliding window when Z_FINISH is used.
If a preset dictionary is needed after this call (see inflateSetDictionary
- below), inflate sets strm->adler to the adler32 checksum of the dictionary
+ below), inflate sets strm->adler to the Adler-32 checksum of the dictionary
chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
- strm->adler to the adler32 checksum of all output produced so far (that is,
+ strm->adler to the Adler-32 checksum of all output produced so far (that is,
total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
below. At the end of the stream, inflate() checks that its computed adler32
checksum is equal to that saved by the compressor and returns Z_STREAM_END
@@ -478,7 +485,9 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
initializing with inflateInit2(). Any information contained in the gzip
header is not retained, so applications that need that information should
instead use raw inflate, see inflateInit2() below, or inflateBack() and
- perform their own processing of the gzip header and trailer.
+ perform their own processing of the gzip header and trailer. When processing
+ gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output
+ producted so far. The CRC-32 is checked against the gzip trailer.
inflate() returns Z_OK if some progress has been made (more input processed
or more output produced), Z_STREAM_END if the end of the compressed data has
@@ -580,10 +589,15 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
uInt dictLength));
/*
Initializes the compression dictionary from the given byte sequence
- without producing any compressed output. This function must be called
- immediately after deflateInit, deflateInit2 or deflateReset, before any call
- of deflate. The compressor and decompressor must use exactly the same
- dictionary (see inflateSetDictionary).
+ without producing any compressed output. When using the zlib format, this
+ function must be called immediately after deflateInit, deflateInit2 or
+ deflateReset, and before any call of deflate. When doing raw deflate, this
+ function must be called either before any call of deflate, or immediately
+ after the completion of a deflate block, i.e. after all input has been
+ consumed and all output has been delivered when using any of the flush
+ options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The
+ compressor and decompressor must use exactly the same dictionary (see
+ inflateSetDictionary).
The dictionary should consist of strings (byte sequences) that are likely
to be encountered later in the data to be compressed, with the most commonly
@@ -610,8 +624,8 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
inconsistent (for example if deflate has already been called for this stream
- or if the compression method is bsort). deflateSetDictionary does not
- perform any compression: this will be done by deflate().
+ or if not at a block boundary for raw deflate). deflateSetDictionary does
+ not perform any compression: this will be done by deflate().
*/
ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
@@ -688,8 +702,28 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
deflation of sourceLen bytes. It must be called after deflateInit() or
deflateInit2(), and after deflateSetHeader(), if used. This would be used
to allocate an output buffer for deflation in a single pass, and so would be
- called before deflate().
-*/
+ called before deflate(). If that first deflate() call is provided the
+ sourceLen input bytes, an output buffer allocated to the size returned by
+ deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed
+ to return Z_STREAM_END. Note that it is possible for the compressed size to
+ be larger than the value returned by deflateBound() if flush options other
+ than Z_FINISH or Z_NO_FLUSH are used.
+*/
+
+ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm,
+ unsigned *pending,
+ int *bits));
+/*
+ deflatePending() returns the number of bytes and bits of output that have
+ been generated, but not yet provided in the available output. The bytes not
+ provided would be due to the available output space having being consumed.
+ The number of bits of output not provided are between 0 and 7, where they
+ await more bits to join them in order to fill out a full byte. If pending
+ or bits are Z_NULL, then those values are not set.
+
+ deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+ */
ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
int bits,
@@ -703,8 +737,9 @@ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
than or equal to 16, and that many of the least significant bits of value
will be inserted in the output.
- deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent.
+ deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough
+ room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the
+ source stream state was inconsistent.
*/
ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
@@ -790,10 +825,11 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
can be determined from the adler32 value returned by that call of inflate.
The compressor and decompressor must use exactly the same dictionary (see
- deflateSetDictionary). For raw inflate, this function can be called
- immediately after inflateInit2() or inflateReset() and before any call of
- inflate() to set the dictionary. The application must insure that the
- dictionary that was used for compression is provided.
+ deflateSetDictionary). For raw inflate, this function can be called at any
+ time to set the dictionary. If the provided dictionary is smaller than the
+ window and there is already data in the window, then the provided dictionary
+ will amend what's there. The application must insure that the dictionary
+ that was used for compression is provided.
inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
@@ -805,17 +841,21 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
/*
- Skips invalid compressed data until a full flush point (see above the
- description of deflate with Z_FULL_FLUSH) can be found, or until all
+ Skips invalid compressed data until a possible full flush point (see above
+ for the description of deflate with Z_FULL_FLUSH) can be found, or until all
available input is skipped. No output is provided.
- inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
- if no more input was provided, Z_DATA_ERROR if no flush point has been
- found, or Z_STREAM_ERROR if the stream structure was inconsistent. In the
- success case, the application may save the current current value of total_in
- which indicates where valid compressed data was found. In the error case,
- the application may repeatedly call inflateSync, providing more input each
- time, until success or end of the input data.
+ inflateSync searches for a 00 00 FF FF pattern in the compressed data.
+ All full flush points have this pattern, but not all occurences of this
+ pattern are full flush points.
+
+ inflateSync returns Z_OK if a possible full flush point has been found,
+ Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
+ has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
+ In the success case, the application may save the current current value of
+ total_in which indicates where valid compressed data was found. In the
+ error case, the application may repeatedly call inflateSync, providing more
+ input each time, until success or end of the input data.
*/
ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
@@ -962,7 +1002,7 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
See inflateBack() for the usage of these routines.
inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
- the paramaters are invalid, Z_MEM_ERROR if the internal state could not be
+ the parameters are invalid, Z_MEM_ERROR if the internal state could not be
allocated, or Z_VERSION_ERROR if the version of the library does not match
the version of the header file.
*/
@@ -1088,6 +1128,7 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
27-31: 0 (reserved)
*/
+#ifndef Z_SOLO
/* utility functions */
@@ -1149,10 +1190,11 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_BUF_ERROR if there was not enough room in the output
- buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
+ buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In
+ the case where there is not enough room, uncompress() will fill the output
+ buffer with the uncompressed data up to that point.
*/
-
/* gzip file access functions */
/*
@@ -1162,7 +1204,7 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
wrapper, documented in RFC 1952, wrapped around a deflate stream.
*/
-typedef voidp gzFile; /* opaque gzip file descriptor */
+typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */
/*
ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
@@ -1172,13 +1214,28 @@ ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only
compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F'
for fixed code compression as in "wb9F". (See the description of
- deflateInit2 for more information about the strategy parameter.) Also "a"
- can be used instead of "w" to request that the gzip stream that will be
- written be appended to the file. "+" will result in an error, since reading
- and writing to the same gzip file is not supported.
+ deflateInit2 for more information about the strategy parameter.) 'T' will
+ request transparent writing or appending with no compression and not using
+ the gzip format.
+
+ "a" can be used instead of "w" to request that the gzip stream that will
+ be written be appended to the file. "+" will result in an error, since
+ reading and writing to the same gzip file is not supported. The addition of
+ "x" when writing will create the file exclusively, which fails if the file
+ already exists. On systems that support it, the addition of "e" when
+ reading or writing will set the flag to close the file on an execve() call.
+
+ These functions, as well as gzip, will read and decode a sequence of gzip
+ streams in a file. The append function of gzopen() can be used to create
+ such a file. (Also see gzflush() for another way to do this.) When
+ appending, gzopen does not test whether the file begins with a gzip stream,
+ nor does it look for the end of the gzip streams to begin appending. gzopen
+ will simply append a gzip stream to the existing file.
gzopen can be used to read a file which is not in gzip format; in this
- case gzread will directly read from the file without decompression.
+ case gzread will directly read from the file without decompression. When
+ reading, this will be detected automatically by looking for the magic two-
+ byte gzip header.
gzopen returns NULL if the file could not be opened, if there was
insufficient memory to allocate the gzFile state, or if an invalid mode was
@@ -1197,7 +1254,11 @@ ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
mode);. The duplicated descriptor should be saved to avoid a leak, since
- gzdopen does not close fd if it fails.
+ gzdopen does not close fd if it fails. If you are using fileno() to get the
+ file descriptor from a FILE *, then you will have to use dup() to avoid
+ double-close()ing the file descriptor. Both gzclose() and fclose() will
+ close the associated file descriptor, so they need to have different file
+ descriptors.
gzdopen returns NULL if there was insufficient memory to allocate the
gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not
@@ -1235,14 +1296,26 @@ ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
/*
Reads the given number of uncompressed bytes from the compressed file. If
- the input file was not in gzip format, gzread copies the given number of
- bytes into the buffer.
+ the input file is not in gzip format, gzread copies the given number of
+ bytes into the buffer directly from the file.
After reaching the end of a gzip stream in the input, gzread will continue
- to read, looking for another gzip stream, or failing that, reading the rest
- of the input file directly without decompression. The entire input file
- will be read if gzread is called until it returns less than the requested
- len.
+ to read, looking for another gzip stream. Any number of gzip streams may be
+ concatenated in the input file, and will all be decompressed by gzread().
+ If something other than a gzip stream is encountered after a gzip stream,
+ that remaining trailing garbage is ignored (and no error is returned).
+
+ gzread can be used to read a gzip file that is being concurrently written.
+ Upon reaching the end of the input, gzread will return with the available
+ data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then
+ gzclearerr can be used to clear the end of file indicator in order to permit
+ gzread to be tried again. Z_OK indicates that a gzip stream was completed
+ on the last gzread. Z_BUF_ERROR indicates that the input file ended in the
+ middle of a gzip stream. Note that gzread does not return -1 in the event
+ of an incomplete gzip stream. This error is deferred until gzclose(), which
+ will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip
+ stream. Alternatively, gzerror can be used before gzclose to detect this
+ case.
gzread returns the number of uncompressed bytes actually read, less than
len for end of file, or -1 for error.
@@ -1256,7 +1329,7 @@ ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
error.
*/
-ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
+ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
/*
Converts, formats, and writes the arguments to the compressed file under
control of the format string, as in fprintf. gzprintf returns the number of
@@ -1301,7 +1374,10 @@ ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
/*
Reads one byte from the compressed file. gzgetc returns this byte or -1
- in case of end of file or error.
+ in case of end of file or error. This is implemented as a macro for speed.
+ As such, it does not do all of the checking the other functions do. I.e.
+ it does not check to see if file is NULL, nor whether the structure file
+ points to has been clobbered or not.
*/
ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
@@ -1397,9 +1473,7 @@ ZEXTERN int ZEXPORT gzeof OF((gzFile file));
ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
/*
Returns true (1) if file is being copied directly while reading, or false
- (0) if file is a gzip stream being decompressed. This state can change from
- false to true while reading the input file if the end of a gzip stream is
- reached, but is followed by data that is not another gzip stream.
+ (0) if file is a gzip stream being decompressed.
If the input file is empty, gzdirect() will return true, since the input
does not contain a gzip stream.
@@ -1408,6 +1482,13 @@ ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
cause buffers to be allocated to allow reading the file to determine if it
is a gzip file. Therefore if gzbuffer() is used, it should be called before
gzdirect().
+
+ When writing, gzdirect() returns true (1) if transparent writing was
+ requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note:
+ gzdirect() is not needed when writing. Transparent writing must be
+ explicitly requested, so the application already knows the answer. When
+ linking statically, using gzdirect() will include all of the zlib code for
+ gzip file reading and decompression, which may not be desired.)
*/
ZEXTERN int ZEXPORT gzclose OF((gzFile file));
@@ -1419,7 +1500,8 @@ ZEXTERN int ZEXPORT gzclose OF((gzFile file));
must not be called more than once on the same allocation.
gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
- file operation error, or Z_OK on success.
+ file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the
+ last read ended in the middle of a gzip stream, or Z_OK on success.
*/
ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
@@ -1457,6 +1539,7 @@ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
file that is being written concurrently.
*/
+#endif /* !Z_SOLO */
/* checksum functions */
@@ -1492,16 +1575,17 @@ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
Combine two Adler-32 checksums into one. For two sequences of bytes, seq1
and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of
- seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
+ seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note
+ that the z_off_t type (like off_t) is a signed integer. If len2 is
+ negative, the result has no meaning or utility.
*/
ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
/*
Update a running CRC-32 with the bytes buf[0..len-1] and return the
updated CRC-32. If buf is Z_NULL, this function returns the required
- initial value for the for the crc. Pre- and post-conditioning (one's
- complement) is performed within this function so it shouldn't be done by the
- application.
+ initial value for the crc. Pre- and post-conditioning (one's complement) is
+ performed within this function so it shouldn't be done by the application.
Usage example:
@@ -1544,17 +1628,42 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
const char *version,
int stream_size));
#define deflateInit(strm, level) \
- deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
+ deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
#define inflateInit(strm) \
- inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))
+ inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
- (strategy), ZLIB_VERSION, sizeof(z_stream))
+ (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
#define inflateInit2(strm, windowBits) \
- inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
+ inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
+ (int)sizeof(z_stream))
#define inflateBackInit(strm, windowBits, window) \
inflateBackInit_((strm), (windowBits), (window), \
- ZLIB_VERSION, sizeof(z_stream))
+ ZLIB_VERSION, (int)sizeof(z_stream))
+
+#ifndef Z_SOLO
+
+/* gzgetc() macro and its supporting function and exposed data structure. Note
+ * that the real internal state is much larger than the exposed structure.
+ * This abbreviated structure exposes just enough for the gzgetc() macro. The
+ * user should not mess with these exposed elements, since their names or
+ * behavior could change in the future, perhaps even capriciously. They can
+ * only be used by the gzgetc() macro. You have been warned.
+ */
+struct gzFile_s {
+ unsigned have;
+ unsigned char *next;
+ z_off64_t pos;
+};
+ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
+#ifdef Z_PREFIX_SET
+# undef z_gzgetc
+# define z_gzgetc(g) \
+ ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
+#else
+# define gzgetc(g) \
+ ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
+#endif
/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
* change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
@@ -1562,7 +1671,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
* functions are changed to 64 bits) -- in case these are set on systems
* without large file support, _LFS64_LARGEFILE must also be true
*/
-#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+#ifdef Z_LARGE64
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
@@ -1571,14 +1680,23 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
#endif
-#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
-# define gzopen gzopen64
-# define gzseek gzseek64
-# define gztell gztell64
-# define gzoffset gzoffset64
-# define adler32_combine adler32_combine64
-# define crc32_combine crc32_combine64
-# ifdef _LARGEFILE64_SOURCE
+#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
+# ifdef Z_PREFIX_SET
+# define z_gzopen z_gzopen64
+# define z_gzseek z_gzseek64
+# define z_gztell z_gztell64
+# define z_gzoffset z_gzoffset64
+# define z_adler32_combine z_adler32_combine64
+# define z_crc32_combine z_crc32_combine64
+# else
+# define gzopen gzopen64
+# define gzseek gzseek64
+# define gztell gztell64
+# define gzoffset gzoffset64
+# define adler32_combine adler32_combine64
+# define crc32_combine crc32_combine64
+# endif
+# ifndef Z_LARGE64
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
@@ -1595,6 +1713,13 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
#endif
+#else /* Z_SOLO */
+
+ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
+ ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
+
+#endif /* !Z_SOLO */
+
/* hack for buggy compilers */
#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
struct internal_state {int dummy;};
@@ -1603,8 +1728,14 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
/* undocumented functions */
ZEXTERN const char * ZEXPORT zError OF((int));
ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
-ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
+ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void));
ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int));
+ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp));
+ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp));
+#if defined(_WIN32) && !defined(Z_SOLO)
+ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path,
+ const char *mode));
+#endif
#ifdef __cplusplus
}
diff --git a/lib/libz/zopen.c b/lib/libz/zopen.c
index 025899f..822a5e1 100644
--- a/lib/libz/zopen.c
+++ b/lib/libz/zopen.c
@@ -3,7 +3,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/lib/libz/zopen.c 84228 2001-09-30 22:39:00Z dillon $");
#include <stdio.h>
#include <zlib.h>
@@ -23,6 +23,12 @@ xgzwrite(void *cookie, const char *data, int size)
return gzwrite(cookie, (void*)data, size);
}
+static int
+xgzclose(void *cookie)
+{
+ return gzclose(cookie);
+}
+
FILE *
zopen(const char *fname, const char *mode)
{
@@ -31,7 +37,7 @@ zopen(const char *fname, const char *mode)
return NULL;
if(*mode == 'r')
- return (funopen(gz, xgzread, NULL, NULL, gzclose));
+ return (funopen(gz, xgzread, NULL, NULL, xgzclose));
else
- return (funopen(gz, NULL, xgzwrite, NULL, gzclose));
+ return (funopen(gz, NULL, xgzwrite, NULL, xgzclose));
}
diff --git a/lib/libz/zutil.c b/lib/libz/zutil.c
index 898ed34..65e0d3b 100644
--- a/lib/libz/zutil.c
+++ b/lib/libz/zutil.c
@@ -1,11 +1,14 @@
/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-2005, 2010 Jean-loup Gailly.
+ * Copyright (C) 1995-2005, 2010, 2011, 2012 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
#include "zutil.h"
+#ifndef Z_SOLO
+# include "gzguts.h"
+#endif
#ifndef NO_DUMMY_DECL
struct internal_state {int dummy;}; /* for buggy compilers */
@@ -85,27 +88,27 @@ uLong ZEXPORT zlibCompileFlags()
#ifdef FASTEST
flags += 1L << 21;
#endif
-#ifdef STDC
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
# ifdef NO_vsnprintf
- flags += 1L << 25;
+ flags += 1L << 25;
# ifdef HAS_vsprintf_void
- flags += 1L << 26;
+ flags += 1L << 26;
# endif
# else
# ifdef HAS_vsnprintf_void
- flags += 1L << 26;
+ flags += 1L << 26;
# endif
# endif
#else
- flags += 1L << 24;
+ flags += 1L << 24;
# ifdef NO_snprintf
- flags += 1L << 25;
+ flags += 1L << 25;
# ifdef HAS_sprintf_void
- flags += 1L << 26;
+ flags += 1L << 26;
# endif
# else
# ifdef HAS_snprintf_void
- flags += 1L << 26;
+ flags += 1L << 26;
# endif
# endif
#endif
@@ -181,6 +184,7 @@ void ZLIB_INTERNAL zmemzero(dest, len)
}
#endif
+#ifndef Z_SOLO
#ifdef SYS16BIT
@@ -316,3 +320,5 @@ void ZLIB_INTERNAL zcfree (opaque, ptr)
}
#endif /* MY_ZCALLOC */
+
+#endif /* !Z_SOLO */
diff --git a/lib/libz/zutil.h b/lib/libz/zutil.h
index 258fa88..4e3dcc6 100644
--- a/lib/libz/zutil.h
+++ b/lib/libz/zutil.h
@@ -1,5 +1,5 @@
/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995-2010 Jean-loup Gailly.
+ * Copyright (C) 1995-2012 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -13,7 +13,7 @@
#ifndef ZUTIL_H
#define ZUTIL_H
-#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
+#ifdef HAVE_HIDDEN
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
#else
# define ZLIB_INTERNAL
@@ -21,7 +21,7 @@
#include "zlib.h"
-#ifdef STDC
+#if defined(STDC) && !defined(Z_SOLO)
# if !(defined(_WIN32_WCE) && defined(_MSC_VER))
# include <stddef.h>
# endif
@@ -29,6 +29,10 @@
# include <stdlib.h>
#endif
+#ifdef Z_SOLO
+ typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */
+#endif
+
#ifndef local
# define local static
#endif
@@ -78,16 +82,18 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
# define OS_CODE 0x00
-# if defined(__TURBOC__) || defined(__BORLANDC__)
-# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
- /* Allow compilation with ANSI keywords only enabled */
- void _Cdecl farfree( void *block );
- void *_Cdecl farmalloc( unsigned long nbytes );
-# else
-# include <alloc.h>
+# ifndef Z_SOLO
+# if defined(__TURBOC__) || defined(__BORLANDC__)
+# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
+ /* Allow compilation with ANSI keywords only enabled */
+ void _Cdecl farfree( void *block );
+ void *_Cdecl farmalloc( unsigned long nbytes );
+# else
+# include <alloc.h>
+# endif
+# else /* MSC or DJGPP */
+# include <malloc.h>
# endif
-# else /* MSC or DJGPP */
-# include <malloc.h>
# endif
#endif
@@ -107,18 +113,20 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#ifdef OS2
# define OS_CODE 0x06
-# ifdef M_I86
+# if defined(M_I86) && !defined(Z_SOLO)
# include <malloc.h>
# endif
#endif
#if defined(MACOS) || defined(TARGET_OS_MAC)
# define OS_CODE 0x07
-# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-# include <unix.h> /* for fdopen */
-# else
-# ifndef fdopen
-# define fdopen(fd,mode) NULL /* No fdopen() */
+# ifndef Z_SOLO
+# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
+# include <unix.h> /* for fdopen */
+# else
+# ifndef fdopen
+# define fdopen(fd,mode) NULL /* No fdopen() */
+# endif
# endif
# endif
#endif
@@ -153,14 +161,14 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# endif
#endif
-#if defined(__BORLANDC__)
+#if defined(__BORLANDC__) && !defined(MSDOS)
#pragma warn -8004
#pragma warn -8008
#pragma warn -8066
#endif
/* provide prototypes for these when building zlib without LFS */
-#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
+#if !defined(_WIN32) && (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
#endif
@@ -177,42 +185,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
/* functions */
-#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
-# ifndef HAVE_VSNPRINTF
-# define HAVE_VSNPRINTF
-# endif
-#endif
-#if defined(__CYGWIN__)
-# ifndef HAVE_VSNPRINTF
-# define HAVE_VSNPRINTF
-# endif
-#endif
-#ifndef HAVE_VSNPRINTF
-# ifdef MSDOS
- /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
- but for now we just assume it doesn't. */
-# define NO_vsnprintf
-# endif
-# ifdef __TURBOC__
-# define NO_vsnprintf
-# endif
-# ifdef WIN32
- /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
-# if !defined(vsnprintf) && !defined(NO_vsnprintf)
-# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 )
-# define vsnprintf _vsnprintf
-# endif
-# endif
-# endif
-# ifdef __SASC
-# define NO_vsnprintf
-# endif
-#endif
-#ifdef VMS
-# define NO_vsnprintf
-#endif
-
-#if defined(pyr)
+#if defined(pyr) || defined(Z_SOLO)
# define NO_MEMCPY
#endif
#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
@@ -261,14 +234,19 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define Tracecv(c,x)
#endif
-
-voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
- unsigned size));
-void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr));
+#ifndef Z_SOLO
+ voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
+ unsigned size));
+ void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr));
+#endif
#define ZALLOC(strm, items, size) \
(*((strm)->zalloc))((strm)->opaque, (items), (size))
#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
+/* Reverse the bytes in a 32-bit value */
+#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
+ (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
+
#endif /* ZUTIL_H */
diff --git a/lib/msun/Makefile b/lib/msun/Makefile
index 0646dc0..a50dded 100644
--- a/lib/msun/Makefile
+++ b/lib/msun/Makefile
@@ -31,6 +31,8 @@ CFLAGS+= -I${.CURDIR}/ld80
CFLAGS+= -I${.CURDIR}/ld128
.endif
+CFLAGS+= -I${.CURDIR}/${ARCH_SUBDIR}
+
.PATH: ${.CURDIR}/bsdsrc
.PATH: ${.CURDIR}/src
.PATH: ${.CURDIR}/man
@@ -94,7 +96,7 @@ COMMON_SRCS+= e_acosl.c e_asinl.c e_atan2l.c e_fmodl.c \
e_hypotl.c e_remainderl.c e_sqrtl.c \
invtrig.c k_cosl.c k_sinl.c k_tanl.c \
s_atanl.c s_cbrtl.c s_ceill.c s_cosl.c s_cprojl.c \
- s_csqrtl.c s_exp2l.c s_floorl.c s_fmal.c \
+ s_csqrtl.c s_exp2l.c s_expl.c s_floorl.c s_fmal.c \
s_frexpl.c s_logbl.c s_nanl.c s_nextafterl.c s_nexttoward.c \
s_remquol.c s_rintl.c s_scalbnl.c \
s_sinl.c s_tanl.c s_truncl.c w_cabsl.c
diff --git a/lib/msun/Makefile.depend b/lib/msun/Makefile.depend
new file mode 100644
index 0000000..a839545
--- /dev/null
+++ b/lib/msun/Makefile.depend
@@ -0,0 +1,19 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libc \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/msun/Symbol.map b/lib/msun/Symbol.map
index f3d3000..76f1bfb 100644
--- a/lib/msun/Symbol.map
+++ b/lib/msun/Symbol.map
@@ -249,4 +249,5 @@ FBSD_1.3 {
ctanf;
ctanh;
ctanhf;
+ expl;
};
diff --git a/lib/msun/i387/s_cos.S b/lib/msun/i387/s_cos.S
index 9c3f2ca..9951ab0 100644
--- a/lib/msun/i387/s_cos.S
+++ b/lib/msun/i387/s_cos.S
@@ -40,16 +40,16 @@ ENTRY(cos)
fldl 4(%esp)
fcos
fnstsw %ax
- andw $0x400,%ax
- jnz 1f
+ sahf
+ jp 1f
ret
1: fldpi
fadd %st(0)
fxch %st(1)
-2: fprem1
+2: fprem
fnstsw %ax
- andw $0x400,%ax
- jnz 2b
+ sahf
+ jp 2b
fstp %st(1)
fcos
ret
diff --git a/lib/msun/i387/s_sin.S b/lib/msun/i387/s_sin.S
index 11c4d63..eb04754 100644
--- a/lib/msun/i387/s_sin.S
+++ b/lib/msun/i387/s_sin.S
@@ -40,16 +40,16 @@ ENTRY(sin)
fldl 4(%esp)
fsin
fnstsw %ax
- andw $0x400,%ax
- jnz 1f
+ sahf
+ jp 1f
ret
1: fldpi
fadd %st(0)
fxch %st(1)
-2: fprem1
+2: fprem
fnstsw %ax
- andw $0x400,%ax
- jnz 2b
+ sahf
+ jp 2b
fstp %st(1)
fsin
ret
diff --git a/lib/msun/i387/s_tan.S b/lib/msun/i387/s_tan.S
index e31ebdf..182b9f7 100644
--- a/lib/msun/i387/s_tan.S
+++ b/lib/msun/i387/s_tan.S
@@ -40,17 +40,17 @@ ENTRY(tan)
fldl 4(%esp)
fptan
fnstsw %ax
- andw $0x400,%ax
- jnz 1f
+ sahf
+ jp 1f
fstp %st(0)
ret
1: fldpi
fadd %st(0)
fxch %st(1)
-2: fprem1
- fstsw %ax
- andw $0x400,%ax
- jnz 2b
+2: fprem
+ fnstsw %ax
+ sahf
+ jp 2b
fstp %st(1)
fptan
fstp %st(0)
diff --git a/lib/msun/ld128/s_expl.c b/lib/msun/ld128/s_expl.c
new file mode 100644
index 0000000..5052c3a
--- /dev/null
+++ b/lib/msun/ld128/s_expl.c
@@ -0,0 +1,261 @@
+/*-
+ * Copyright (c) 2012 Steven G. Kargl
+ * 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 unmodified, 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 ``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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+/*
+ * ld128 version of s_expl.c. See ../ld80/s_expl.c for most comments.
+ */
+
+#include <float.h>
+
+#include "fpmath.h"
+#include "math.h"
+#include "math_private.h"
+
+#define INTERVALS 128
+#define BIAS (LDBL_MAX_EXP - 1)
+
+static volatile const long double tiny = 0x1p-10000L;
+
+static const long double
+INV_L = 1.84664965233787316142070359168242182e+02L,
+L1 = 5.41521234812457272982212595914567508e-03L,
+L2 = -1.02536706388947310094527932552595546e-29L,
+huge = 0x1p10000L,
+o_threshold = 11356.523406294143949491931077970763428L,
+twom10000 = 0x1p-10000L,
+u_threshold = -11433.462743336297878837243843452621503L;
+
+static const long double
+P2 = 5.00000000000000000000000000000000000e-1L,
+P3 = 1.66666666666666666666666666666666972e-1L,
+P4 = 4.16666666666666666666666666653708268e-2L,
+P5 = 8.33333333333333333333333315069867254e-3L,
+P6 = 1.38888888888888888888996596213795377e-3L,
+P7 = 1.98412698412698412718821436278644414e-4L,
+P8 = 2.48015873015869681884882576649543128e-5L,
+P9 = 2.75573192240103867817876199544468806e-6L,
+P10 = 2.75573236172670046201884000197885520e-7L,
+P11 = 2.50517544183909126492878226167697856e-8L;
+
+static const struct {
+ long double hi;
+ long double lo;
+} s[INTERVALS] = {
+ 0x1p0L, 0x0p0L,
+ 0x1.0163da9fb33356d84a66aep0L, 0x3.36dcdfa4003ec04c360be2404078p-92L,
+ 0x1.02c9a3e778060ee6f7cacap0L, 0x4.f7a29bde93d70a2cabc5cb89ba10p-92L,
+ 0x1.04315e86e7f84bd738f9a2p0L, 0xd.a47e6ed040bb4bfc05af6455e9b8p-96L,
+ 0x1.059b0d31585743ae7c548ep0L, 0xb.68ca417fe53e3495f7df4baf84a0p-92L,
+ 0x1.0706b29ddf6ddc6dc403a8p0L, 0x1.d87b27ed07cb8b092ac75e311753p-88L,
+ 0x1.0874518759bc808c35f25cp0L, 0x1.9427fa2b041b2d6829d8993a0d01p-88L,
+ 0x1.09e3ecac6f3834521e060cp0L, 0x5.84d6b74ba2e023da730e7fccb758p-92L,
+ 0x1.0b5586cf9890f6298b92b6p0L, 0x1.1842a98364291408b3ceb0a2a2bbp-88L,
+ 0x1.0cc922b7247f7407b705b8p0L, 0x9.3dc5e8aac564e6fe2ef1d431fd98p-92L,
+ 0x1.0e3ec32d3d1a2020742e4ep0L, 0x1.8af6a552ac4b358b1129e9f966a4p-88L,
+ 0x1.0fb66affed31af232091dcp0L, 0x1.8a1426514e0b627bda694a400a27p-88L,
+ 0x1.11301d0125b50a4ebbf1aep0L, 0xd.9318ceac5cc47ab166ee57427178p-92L,
+ 0x1.12abdc06c31cbfb92bad32p0L, 0x4.d68e2f7270bdf7cedf94eb1cb818p-92L,
+ 0x1.1429aaea92ddfb34101942p0L, 0x1.b2586d01844b389bea7aedd221d4p-88L,
+ 0x1.15a98c8a58e512480d573cp0L, 0x1.d5613bf92a2b618ee31b376c2689p-88L,
+ 0x1.172b83c7d517adcdf7c8c4p0L, 0x1.0eb14a792035509ff7d758693f24p-88L,
+ 0x1.18af9388c8de9bbbf70b9ap0L, 0x3.c2505c97c0102e5f1211941d2840p-92L,
+ 0x1.1a35beb6fcb753cb698f68p0L, 0x1.2d1c835a6c30724d5cfae31b84e5p-88L,
+ 0x1.1bbe084045cd39ab1e72b4p0L, 0x4.27e35f9acb57e473915519a1b448p-92L,
+ 0x1.1d4873168b9aa7805b8028p0L, 0x9.90f07a98b42206e46166cf051d70p-92L,
+ 0x1.1ed5022fcd91cb8819ff60p0L, 0x1.121d1e504d36c47474c9b7de6067p-88L,
+ 0x1.2063b88628cd63b8eeb028p0L, 0x1.50929d0fc487d21c2b84004264dep-88L,
+ 0x1.21f49917ddc962552fd292p0L, 0x9.4bdb4b61ea62477caa1dce823ba0p-92L,
+ 0x1.2387a6e75623866c1fadb0p0L, 0x1.c15cb593b0328566902df69e4de2p-88L,
+ 0x1.251ce4fb2a63f3582ab7dep0L, 0x9.e94811a9c8afdcf796934bc652d0p-92L,
+ 0x1.26b4565e27cdd257a67328p0L, 0x1.d3b249dce4e9186ddd5ff44e6b08p-92L,
+ 0x1.284dfe1f5638096cf15cf0p0L, 0x3.ca0967fdaa2e52d7c8106f2e262cp-92L,
+ 0x1.29e9df51fdee12c25d15f4p0L, 0x1.a24aa3bca890ac08d203fed80a07p-88L,
+ 0x1.2b87fd0dad98ffddea4652p0L, 0x1.8fcab88442fdc3cb6de4519165edp-88L,
+ 0x1.2d285a6e4030b40091d536p0L, 0xd.075384589c1cd1b3e4018a6b1348p-92L,
+ 0x1.2ecafa93e2f5611ca0f45cp0L, 0x1.523833af611bdcda253c554cf278p-88L,
+ 0x1.306fe0a31b7152de8d5a46p0L, 0x3.05c85edecbc27343629f502f1af2p-92L,
+ 0x1.32170fc4cd8313539cf1c2p0L, 0x1.008f86dde3220ae17a005b6412bep-88L,
+ 0x1.33c08b26416ff4c9c8610cp0L, 0x1.96696bf95d1593039539d94d662bp-88L,
+ 0x1.356c55f929ff0c94623476p0L, 0x3.73af38d6d8d6f9506c9bbc93cbc0p-92L,
+ 0x1.371a7373aa9caa7145502ep0L, 0x1.4547987e3e12516bf9c699be432fp-88L,
+ 0x1.38cae6d05d86585a9cb0d8p0L, 0x1.bed0c853bd30a02790931eb2e8f0p-88L,
+ 0x1.3a7db34e59ff6ea1bc9298p0L, 0x1.e0a1d336163fe2f852ceeb134067p-88L,
+ 0x1.3c32dc313a8e484001f228p0L, 0xb.58f3775e06ab66353001fae9fca0p-92L,
+ 0x1.3dea64c12342235b41223ep0L, 0x1.3d773fba2cb82b8244267c54443fp-92L,
+ 0x1.3fa4504ac801ba0bf701aap0L, 0x4.1832fb8c1c8dbdff2c49909e6c60p-92L,
+ 0x1.4160a21f72e29f84325b8ep0L, 0x1.3db61fb352f0540e6ba05634413ep-88L,
+ 0x1.431f5d950a896dc7044394p0L, 0x1.0ccec81e24b0caff7581ef4127f7p-92L,
+ 0x1.44e086061892d03136f408p0L, 0x1.df019fbd4f3b48709b78591d5cb5p-88L,
+ 0x1.46a41ed1d005772512f458p0L, 0x1.229d97df404ff21f39c1b594d3a8p-88L,
+ 0x1.486a2b5c13cd013c1a3b68p0L, 0x1.062f03c3dd75ce8757f780e6ec99p-88L,
+ 0x1.4a32af0d7d3de672d8bcf4p0L, 0x6.f9586461db1d878b1d148bd3ccb8p-92L,
+ 0x1.4bfdad5362a271d4397afep0L, 0xc.42e20e0363ba2e159c579f82e4b0p-92L,
+ 0x1.4dcb299fddd0d63b36ef1ap0L, 0x9.e0cc484b25a5566d0bd5f58ad238p-92L,
+ 0x1.4f9b2769d2ca6ad33d8b68p0L, 0x1.aa073ee55e028497a329a7333dbap-88L,
+ 0x1.516daa2cf6641c112f52c8p0L, 0x4.d822190e718226177d7608d20038p-92L,
+ 0x1.5342b569d4f81df0a83c48p0L, 0x1.d86a63f4e672a3e429805b049465p-88L,
+ 0x1.551a4ca5d920ec52ec6202p0L, 0x4.34ca672645dc6c124d6619a87574p-92L,
+ 0x1.56f4736b527da66ecb0046p0L, 0x1.64eb3c00f2f5ab3d801d7cc7272dp-88L,
+ 0x1.58d12d497c7fd252bc2b72p0L, 0x1.43bcf2ec936a970d9cc266f0072fp-88L,
+ 0x1.5ab07dd48542958c930150p0L, 0x1.91eb345d88d7c81280e069fbdb63p-88L,
+ 0x1.5c9268a5946b701c4b1b80p0L, 0x1.6986a203d84e6a4a92f179e71889p-88L,
+ 0x1.5e76f15ad21486e9be4c20p0L, 0x3.99766a06548a05829e853bdb2b52p-92L,
+ 0x1.605e1b976dc08b076f592ap0L, 0x4.86e3b34ead1b4769df867b9c89ccp-92L,
+ 0x1.6247eb03a5584b1f0fa06ep0L, 0x1.d2da42bb1ceaf9f732275b8aef30p-88L,
+ 0x1.6434634ccc31fc76f8714cp0L, 0x4.ed9a4e41000307103a18cf7a6e08p-92L,
+ 0x1.66238825522249127d9e28p0L, 0x1.b8f314a337f4dc0a3adf1787ff74p-88L,
+ 0x1.68155d44ca973081c57226p0L, 0x1.b9f32706bfe4e627d809a85dcc66p-88L,
+ 0x1.6a09e667f3bcc908b2fb12p0L, 0x1.66ea957d3e3adec17512775099dap-88L,
+ 0x1.6c012750bdabeed76a9980p0L, 0xf.4f33fdeb8b0ecd831106f57b3d00p-96L,
+ 0x1.6dfb23c651a2ef220e2cbep0L, 0x1.bbaa834b3f11577ceefbe6c1c411p-92L,
+ 0x1.6ff7df9519483cf87e1b4ep0L, 0x1.3e213bff9b702d5aa477c12523cep-88L,
+ 0x1.71f75e8ec5f73dd2370f2ep0L, 0xf.0acd6cb434b562d9e8a20adda648p-92L,
+ 0x1.73f9a48a58173bd5c9a4e6p0L, 0x8.ab1182ae217f3a7681759553e840p-92L,
+ 0x1.75feb564267c8bf6e9aa32p0L, 0x1.a48b27071805e61a17b954a2dad8p-88L,
+ 0x1.780694fde5d3f619ae0280p0L, 0x8.58b2bb2bdcf86cd08e35fb04c0f0p-92L,
+ 0x1.7a11473eb0186d7d51023ep0L, 0x1.6cda1f5ef42b66977960531e821bp-88L,
+ 0x1.7c1ed0130c1327c4933444p0L, 0x1.937562b2dc933d44fc828efd4c9cp-88L,
+ 0x1.7e2f336cf4e62105d02ba0p0L, 0x1.5797e170a1427f8fcdf5f3906108p-88L,
+ 0x1.80427543e1a11b60de6764p0L, 0x9.a354ea706b8e4d8b718a672bf7c8p-92L,
+ 0x1.82589994cce128acf88afap0L, 0xb.34a010f6ad65cbbac0f532d39be0p-92L,
+ 0x1.8471a4623c7acce52f6b96p0L, 0x1.c64095370f51f48817914dd78665p-88L,
+ 0x1.868d99b4492ec80e41d90ap0L, 0xc.251707484d73f136fb5779656b70p-92L,
+ 0x1.88ac7d98a669966530bcdep0L, 0x1.2d4e9d61283ef385de170ab20f96p-88L,
+ 0x1.8ace5422aa0db5ba7c55a0p0L, 0x1.92c9bb3e6ed61f2733304a346d8fp-88L,
+ 0x1.8cf3216b5448bef2aa1cd0p0L, 0x1.61c55d84a9848f8c453b3ca8c946p-88L,
+ 0x1.8f1ae991577362b982745cp0L, 0x7.2ed804efc9b4ae1458ae946099d4p-92L,
+ 0x1.9145b0b91ffc588a61b468p0L, 0x1.f6b70e01c2a90229a4c4309ea719p-88L,
+ 0x1.93737b0cdc5e4f4501c3f2p0L, 0x5.40a22d2fc4af581b63e8326efe9cp-92L,
+ 0x1.95a44cbc8520ee9b483694p0L, 0x1.a0fc6f7c7d61b2b3a22a0eab2cadp-88L,
+ 0x1.97d829fde4e4f8b9e920f8p0L, 0x1.1e8bd7edb9d7144b6f6818084cc7p-88L,
+ 0x1.9a0f170ca07b9ba3109b8cp0L, 0x4.6737beb19e1eada6825d3c557428p-92L,
+ 0x1.9c49182a3f0901c7c46b06p0L, 0x1.1f2be58ddade50c217186c90b457p-88L,
+ 0x1.9e86319e323231824ca78ep0L, 0x6.4c6e010f92c082bbadfaf605cfd4p-92L,
+ 0x1.a0c667b5de564b29ada8b8p0L, 0xc.ab349aa0422a8da7d4512edac548p-92L,
+ 0x1.a309bec4a2d3358c171f76p0L, 0x1.0daad547fa22c26d168ea762d854p-88L,
+ 0x1.a5503b23e255c8b424491cp0L, 0xa.f87bc8050a405381703ef7caff50p-92L,
+ 0x1.a799e1330b3586f2dfb2b0p0L, 0x1.58f1a98796ce8908ae852236ca94p-88L,
+ 0x1.a9e6b5579fdbf43eb243bcp0L, 0x1.ff4c4c58b571cf465caf07b4b9f5p-88L,
+ 0x1.ac36bbfd3f379c0db966a2p0L, 0x1.1265fc73e480712d20f8597a8e7bp-88L,
+ 0x1.ae89f995ad3ad5e8734d16p0L, 0x1.73205a7fbc3ae675ea440b162d6cp-88L,
+ 0x1.b0e07298db66590842acdep0L, 0x1.c6f6ca0e5dcae2aafffa7a0554cbp-88L,
+ 0x1.b33a2b84f15faf6bfd0e7ap0L, 0x1.d947c2575781dbb49b1237c87b6ep-88L,
+ 0x1.b59728de559398e3881110p0L, 0x1.64873c7171fefc410416be0a6525p-88L,
+ 0x1.b7f76f2fb5e46eaa7b081ap0L, 0xb.53c5354c8903c356e4b625aacc28p-92L,
+ 0x1.ba5b030a10649840cb3c6ap0L, 0xf.5b47f297203757e1cc6eadc8bad0p-92L,
+ 0x1.bcc1e904bc1d2247ba0f44p0L, 0x1.b3d08cd0b20287092bd59be4ad98p-88L,
+ 0x1.bf2c25bd71e088408d7024p0L, 0x1.18e3449fa073b356766dfb568ff4p-88L,
+ 0x1.c199bdd85529c2220cb12ap0L, 0x9.1ba6679444964a36661240043970p-96L,
+ 0x1.c40ab5fffd07a6d14df820p0L, 0xf.1828a5366fd387a7bdd54cdf7300p-92L,
+ 0x1.c67f12e57d14b4a2137fd2p0L, 0xf.2b301dd9e6b151a6d1f9d5d5f520p-96L,
+ 0x1.c8f6d9406e7b511acbc488p0L, 0x5.c442ddb55820171f319d9e5076a8p-96L,
+ 0x1.cb720dcef90691503cbd1ep0L, 0x9.49db761d9559ac0cb6dd3ed599e0p-92L,
+ 0x1.cdf0b555dc3f9c44f8958ep0L, 0x1.ac51be515f8c58bdfb6f5740a3a4p-88L,
+ 0x1.d072d4a07897b8d0f22f20p0L, 0x1.a158e18fbbfc625f09f4cca40874p-88L,
+ 0x1.d2f87080d89f18ade12398p0L, 0x9.ea2025b4c56553f5cdee4c924728p-92L,
+ 0x1.d5818dcfba48725da05aeap0L, 0x1.66e0dca9f589f559c0876ff23830p-88L,
+ 0x1.d80e316c98397bb84f9d04p0L, 0x8.805f84bec614de269900ddf98d28p-92L,
+ 0x1.da9e603db3285708c01a5ap0L, 0x1.6d4c97f6246f0ec614ec95c99392p-88L,
+ 0x1.dd321f301b4604b695de3cp0L, 0x6.30a393215299e30d4fb73503c348p-96L,
+ 0x1.dfc97337b9b5eb968cac38p0L, 0x1.ed291b7225a944efd5bb5524b927p-88L,
+ 0x1.e264614f5a128a12761fa0p0L, 0x1.7ada6467e77f73bf65e04c95e29dp-88L,
+ 0x1.e502ee78b3ff6273d13014p0L, 0x1.3991e8f49659e1693be17ae1d2f9p-88L,
+ 0x1.e7a51fbc74c834b548b282p0L, 0x1.23786758a84f4956354634a416cep-88L,
+ 0x1.ea4afa2a490d9858f73a18p0L, 0xf.5db301f86dea20610ceee13eb7b8p-92L,
+ 0x1.ecf482d8e67f08db0312fap0L, 0x1.949cef462010bb4bc4ce72a900dfp-88L,
+ 0x1.efa1bee615a27771fd21a8p0L, 0x1.2dac1f6dd5d229ff68e46f27e3dfp-88L,
+ 0x1.f252b376bba974e8696fc2p0L, 0x1.6390d4c6ad5476b5162f40e1d9a9p-88L,
+ 0x1.f50765b6e4540674f84b76p0L, 0x2.862baff99000dfc4352ba29b8908p-92L,
+ 0x1.f7bfdad9cbe138913b4bfep0L, 0x7.2bd95c5ce7280fa4d2344a3f5618p-92L,
+ 0x1.fa7c1819e90d82e90a7e74p0L, 0xb.263c1dc060c36f7650b4c0f233a8p-92L,
+ 0x1.fd3c22b8f71f10975ba4b2p0L, 0x1.2bcf3a5e12d269d8ad7c1a4a8875p-88L
+};
+
+long double
+expl(long double x)
+{
+ union IEEEl2bits u, v;
+ long double fn, r, r1, r2, q, t, twopk, twopkp10000;
+ int k, n, n2;
+ uint32_t hx, ix;
+
+ /* Filter out exceptional cases. */
+ u.e = x;
+ hx = u.xbits.expsign;
+ ix = hx & 0x7fff;
+ if (ix >= BIAS + 13) { /* |x| >= 8192 or x is NaN */
+ if (ix == BIAS + LDBL_MAX_EXP) {
+ if (hx & 0x8000 && u.xbits.manh == 0 &&
+ u.xbits.manl == 0)
+ return (0.0L); /* x is -Inf */
+ return (x + x); /* x is +Inf or NaN */
+ }
+ if (x > o_threshold)
+ return (huge * huge);
+ if (x < u_threshold)
+ return (tiny * tiny);
+ } else if (ix < BIAS - 115) { /* |x| < 0x1p-115 */
+ if (huge + x > 1.0L) /* trigger inexact iff x != 0 */
+ return (1.0L + x);
+ }
+
+ /* Reduce x to (k*ln2 + midpoint[n2] + r1 + r2). */
+ fn = x * INV_L + 0x1.8p112 - 0x1.8p112;
+ n = (int)fn;
+ n2 = (unsigned)n % INTERVALS;
+ k = (n - n2) / INTERVALS;
+ r1 = x - fn * L1;
+ r2 = -fn * L2;
+
+ /* Prepare scale factors. */
+ v.xbits.manh = 0;
+ v.xbits.manl = 0;
+ if (k >= LDBL_MIN_EXP) {
+ v.xbits.expsign = BIAS + k;
+ twopk = v.e;
+ } else {
+ v.xbits.expsign = BIAS + k + 10000;
+ twopkp10000 = v.e;
+ }
+
+ r = r1 + r2;
+ q = r * r * (P2 + r * (P3 + r * (P4 + r * (P5 + r * (P6 + r * (P7 +
+ r * (P8 + r * (P9 + r * (P10 + r * P11)))))))));
+ t = s[n2].lo + s[n2].hi;
+ t = s[n2].hi + (s[n2].lo + t * (r2 + q + r1));
+
+ /* Scale by 2**k. */
+ if (k >= LDBL_MIN_EXP) {
+ if (k == LDBL_MAX_EXP)
+ return (t * 2.0L * 0x1p16383L);
+ return (t * twopk);
+ } else {
+ return (t * twopkp10000 * twom10000);
+ }
+}
diff --git a/lib/msun/ld80/s_expl.c b/lib/msun/ld80/s_expl.c
new file mode 100644
index 0000000..af63668
--- /dev/null
+++ b/lib/msun/ld80/s_expl.c
@@ -0,0 +1,304 @@
+/*-
+ * Copyright (c) 2009-2012 Steven G. Kargl
+ * 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 unmodified, 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 ``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.
+ *
+ * Optimized by Bruce D. Evans.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+/*-
+ * Compute the exponential of x for Intel 80-bit format. This is based on:
+ *
+ * PTP Tang, "Table-driven implementation of the exponential function
+ * in IEEE floating-point arithmetic," ACM Trans. Math. Soft., 15,
+ * 144-157 (1989).
+ *
+ * where the 32 table entries have been expanded to INTERVALS (see below).
+ */
+
+#include <float.h>
+
+#ifdef __i386__
+#include <ieeefp.h>
+#endif
+
+#include "fpmath.h"
+#include "math.h"
+#include "math_private.h"
+
+#define INTERVALS 128
+#define BIAS (LDBL_MAX_EXP - 1)
+
+static const long double
+huge = 0x1p10000L,
+twom10000 = 0x1p-10000L;
+/* XXX Prevent gcc from erroneously constant folding this: */
+static volatile const long double tiny = 0x1p-10000L;
+
+static const union IEEEl2bits
+/* log(2**16384 - 0.5) rounded towards zero: */
+o_threshold = LD80C(0xb17217f7d1cf79ab, 13, 11356.5234062941439488L),
+/* log(2**(-16381-64-1)) rounded towards zero: */
+u_threshold = LD80C(0xb21dfe7f09e2baa9, 13, -11399.4985314888605581L);
+
+static const double
+/*
+ * ln2/INTERVALS = L1+L2 (hi+lo decomposition for multiplication). L1 must
+ * have at least 22 (= log2(|LDBL_MIN_EXP-extras|) + log2(INTERVALS)) lowest
+ * bits zero so that multiplication of it by n is exact.
+ */
+INV_L = 1.8466496523378731e+2, /* 0x171547652b82fe.0p-45 */
+L1 = 5.4152123484527692e-3, /* 0x162e42ff000000.0p-60 */
+L2 = -3.2819649005320973e-13, /* -0x1718432a1b0e26.0p-94 */
+/*
+ * Domain [-0.002708, 0.002708], range ~[-5.7136e-24, 5.7110e-24]:
+ * |exp(x) - p(x)| < 2**-77.2
+ * (0.002708 is ln2/(2*INTERVALS) rounded up a little).
+ */
+P2 = 0.5,
+P3 = 1.6666666666666119e-1, /* 0x15555555555490.0p-55 */
+P4 = 4.1666666666665887e-2, /* 0x155555555554e5.0p-57 */
+P5 = 8.3333354987869413e-3, /* 0x1111115b789919.0p-59 */
+P6 = 1.3888891738560272e-3; /* 0x16c16c651633ae.0p-62 */
+
+/*
+ * 2^(i/INTERVALS) for i in [0,INTERVALS] is represented by two values where
+ * the first 53 bits of the significand are stored in hi and the next 53
+ * bits are in lo. Tang's paper states that the trailing 6 bits of hi must
+ * be zero for his algorithm in both single and double precision, because
+ * the table is re-used in the implementation of expm1() where a floating
+ * point addition involving hi must be exact. Here hi is double, so
+ * converting it to long double gives 11 trailing zero bits.
+ */
+static const struct {
+ double hi;
+ double lo;
+/* XXX should rename 's'. */
+} s[INTERVALS] = {
+ 0x1p+0, 0x0p+0,
+ 0x1.0163da9fb3335p+0, 0x1.b61299ab8cdb7p-54,
+ 0x1.02c9a3e778060p+0, 0x1.dcdef95949ef4p-53,
+ 0x1.04315e86e7f84p+0, 0x1.7ae71f3441b49p-53,
+ 0x1.059b0d3158574p+0, 0x1.d73e2a475b465p-55,
+ 0x1.0706b29ddf6ddp+0, 0x1.8db880753b0f6p-53,
+ 0x1.0874518759bc8p+0, 0x1.186be4bb284ffp-57,
+ 0x1.09e3ecac6f383p+0, 0x1.1487818316136p-54,
+ 0x1.0b5586cf9890fp+0, 0x1.8a62e4adc610bp-54,
+ 0x1.0cc922b7247f7p+0, 0x1.01edc16e24f71p-54,
+ 0x1.0e3ec32d3d1a2p+0, 0x1.03a1727c57b53p-59,
+ 0x1.0fb66affed31ap+0, 0x1.e464123bb1428p-53,
+ 0x1.11301d0125b50p+0, 0x1.49d77e35db263p-53,
+ 0x1.12abdc06c31cbp+0, 0x1.f72575a649ad2p-53,
+ 0x1.1429aaea92ddfp+0, 0x1.66820328764b1p-53,
+ 0x1.15a98c8a58e51p+0, 0x1.2406ab9eeab0ap-55,
+ 0x1.172b83c7d517ap+0, 0x1.b9bef918a1d63p-53,
+ 0x1.18af9388c8de9p+0, 0x1.777ee1734784ap-53,
+ 0x1.1a35beb6fcb75p+0, 0x1.e5b4c7b4968e4p-55,
+ 0x1.1bbe084045cd3p+0, 0x1.3563ce56884fcp-53,
+ 0x1.1d4873168b9aap+0, 0x1.e016e00a2643cp-54,
+ 0x1.1ed5022fcd91cp+0, 0x1.71033fec2243ap-53,
+ 0x1.2063b88628cd6p+0, 0x1.dc775814a8495p-55,
+ 0x1.21f49917ddc96p+0, 0x1.2a97e9494a5eep-55,
+ 0x1.2387a6e756238p+0, 0x1.9b07eb6c70573p-54,
+ 0x1.251ce4fb2a63fp+0, 0x1.ac155bef4f4a4p-55,
+ 0x1.26b4565e27cddp+0, 0x1.2bd339940e9d9p-55,
+ 0x1.284dfe1f56380p+0, 0x1.2d9e2b9e07941p-53,
+ 0x1.29e9df51fdee1p+0, 0x1.612e8afad1255p-55,
+ 0x1.2b87fd0dad98fp+0, 0x1.fbbd48ca71f95p-53,
+ 0x1.2d285a6e4030bp+0, 0x1.0024754db41d5p-54,
+ 0x1.2ecafa93e2f56p+0, 0x1.1ca0f45d52383p-56,
+ 0x1.306fe0a31b715p+0, 0x1.6f46ad23182e4p-55,
+ 0x1.32170fc4cd831p+0, 0x1.a9ce78e18047cp-55,
+ 0x1.33c08b26416ffp+0, 0x1.32721843659a6p-54,
+ 0x1.356c55f929ff0p+0, 0x1.928c468ec6e76p-53,
+ 0x1.371a7373aa9cap+0, 0x1.4e28aa05e8a8fp-53,
+ 0x1.38cae6d05d865p+0, 0x1.0b53961b37da2p-53,
+ 0x1.3a7db34e59ff6p+0, 0x1.d43792533c144p-53,
+ 0x1.3c32dc313a8e4p+0, 0x1.08003e4516b1ep-53,
+ 0x1.3dea64c123422p+0, 0x1.ada0911f09ebcp-55,
+ 0x1.3fa4504ac801bp+0, 0x1.417ee03548306p-53,
+ 0x1.4160a21f72e29p+0, 0x1.f0864b71e7b6cp-53,
+ 0x1.431f5d950a896p+0, 0x1.b8e088728219ap-53,
+ 0x1.44e086061892dp+0, 0x1.89b7a04ef80d0p-59,
+ 0x1.46a41ed1d0057p+0, 0x1.c944bd1648a76p-54,
+ 0x1.486a2b5c13cd0p+0, 0x1.3c1a3b69062f0p-56,
+ 0x1.4a32af0d7d3dep+0, 0x1.9cb62f3d1be56p-54,
+ 0x1.4bfdad5362a27p+0, 0x1.d4397afec42e2p-56,
+ 0x1.4dcb299fddd0dp+0, 0x1.8ecdbbc6a7833p-54,
+ 0x1.4f9b2769d2ca6p+0, 0x1.5a67b16d3540ep-53,
+ 0x1.516daa2cf6641p+0, 0x1.8225ea5909b04p-53,
+ 0x1.5342b569d4f81p+0, 0x1.be1507893b0d5p-53,
+ 0x1.551a4ca5d920ep+0, 0x1.8a5d8c4048699p-53,
+ 0x1.56f4736b527dap+0, 0x1.9bb2c011d93adp-54,
+ 0x1.58d12d497c7fdp+0, 0x1.295e15b9a1de8p-55,
+ 0x1.5ab07dd485429p+0, 0x1.6324c054647adp-54,
+ 0x1.5c9268a5946b7p+0, 0x1.c4b1b816986a2p-60,
+ 0x1.5e76f15ad2148p+0, 0x1.ba6f93080e65ep-54,
+ 0x1.605e1b976dc08p+0, 0x1.60edeb25490dcp-53,
+ 0x1.6247eb03a5584p+0, 0x1.63e1f40dfa5b5p-53,
+ 0x1.6434634ccc31fp+0, 0x1.8edf0e2989db3p-53,
+ 0x1.6623882552224p+0, 0x1.224fb3c5371e6p-53,
+ 0x1.68155d44ca973p+0, 0x1.038ae44f73e65p-57,
+ 0x1.6a09e667f3bccp+0, 0x1.21165f626cdd5p-53,
+ 0x1.6c012750bdabep+0, 0x1.daed533001e9ep-53,
+ 0x1.6dfb23c651a2ep+0, 0x1.e441c597c3775p-53,
+ 0x1.6ff7df9519483p+0, 0x1.9f0fc369e7c42p-53,
+ 0x1.71f75e8ec5f73p+0, 0x1.ba46e1e5de15ap-53,
+ 0x1.73f9a48a58173p+0, 0x1.7ab9349cd1562p-53,
+ 0x1.75feb564267c8p+0, 0x1.7edd354674916p-53,
+ 0x1.780694fde5d3fp+0, 0x1.866b80a02162dp-54,
+ 0x1.7a11473eb0186p+0, 0x1.afaa2047ed9b4p-53,
+ 0x1.7c1ed0130c132p+0, 0x1.f124cd1164dd6p-54,
+ 0x1.7e2f336cf4e62p+0, 0x1.05d02ba15797ep-56,
+ 0x1.80427543e1a11p+0, 0x1.6c1bccec9346bp-53,
+ 0x1.82589994cce12p+0, 0x1.159f115f56694p-53,
+ 0x1.8471a4623c7acp+0, 0x1.9ca5ed72f8c81p-53,
+ 0x1.868d99b4492ecp+0, 0x1.01c83b21584a3p-53,
+ 0x1.88ac7d98a6699p+0, 0x1.994c2f37cb53ap-54,
+ 0x1.8ace5422aa0dbp+0, 0x1.6e9f156864b27p-54,
+ 0x1.8cf3216b5448bp+0, 0x1.de55439a2c38bp-53,
+ 0x1.8f1ae99157736p+0, 0x1.5cc13a2e3976cp-55,
+ 0x1.9145b0b91ffc5p+0, 0x1.114c368d3ed6ep-53,
+ 0x1.93737b0cdc5e4p+0, 0x1.e8a0387e4a814p-53,
+ 0x1.95a44cbc8520ep+0, 0x1.d36906d2b41f9p-53,
+ 0x1.97d829fde4e4fp+0, 0x1.173d241f23d18p-53,
+ 0x1.9a0f170ca07b9p+0, 0x1.7462137188ce7p-53,
+ 0x1.9c49182a3f090p+0, 0x1.c7c46b071f2bep-56,
+ 0x1.9e86319e32323p+0, 0x1.824ca78e64c6ep-56,
+ 0x1.a0c667b5de564p+0, 0x1.6535b51719567p-53,
+ 0x1.a309bec4a2d33p+0, 0x1.6305c7ddc36abp-54,
+ 0x1.a5503b23e255cp+0, 0x1.1684892395f0fp-53,
+ 0x1.a799e1330b358p+0, 0x1.bcb7ecac563c7p-54,
+ 0x1.a9e6b5579fdbfp+0, 0x1.0fac90ef7fd31p-54,
+ 0x1.ac36bbfd3f379p+0, 0x1.81b72cd4624ccp-53,
+ 0x1.ae89f995ad3adp+0, 0x1.7a1cd345dcc81p-54,
+ 0x1.b0e07298db665p+0, 0x1.2108559bf8deep-53,
+ 0x1.b33a2b84f15fap+0, 0x1.ed7fa1cf7b290p-53,
+ 0x1.b59728de55939p+0, 0x1.1c7102222c90ep-53,
+ 0x1.b7f76f2fb5e46p+0, 0x1.d54f610356a79p-53,
+ 0x1.ba5b030a10649p+0, 0x1.0819678d5eb69p-53,
+ 0x1.bcc1e904bc1d2p+0, 0x1.23dd07a2d9e84p-55,
+ 0x1.bf2c25bd71e08p+0, 0x1.0811ae04a31c7p-53,
+ 0x1.c199bdd85529cp+0, 0x1.11065895048ddp-55,
+ 0x1.c40ab5fffd07ap+0, 0x1.b4537e083c60ap-54,
+ 0x1.c67f12e57d14bp+0, 0x1.2884dff483cadp-54,
+ 0x1.c8f6d9406e7b5p+0, 0x1.1acbc48805c44p-56,
+ 0x1.cb720dcef9069p+0, 0x1.503cbd1e949dbp-56,
+ 0x1.cdf0b555dc3f9p+0, 0x1.889f12b1f58a3p-53,
+ 0x1.d072d4a07897bp+0, 0x1.1a1e45e4342b2p-53,
+ 0x1.d2f87080d89f1p+0, 0x1.15bc247313d44p-53,
+ 0x1.d5818dcfba487p+0, 0x1.2ed02d75b3707p-55,
+ 0x1.d80e316c98397p+0, 0x1.7709f3a09100cp-53,
+ 0x1.da9e603db3285p+0, 0x1.c2300696db532p-54,
+ 0x1.dd321f301b460p+0, 0x1.2da5778f018c3p-54,
+ 0x1.dfc97337b9b5ep+0, 0x1.72d195873da52p-53,
+ 0x1.e264614f5a128p+0, 0x1.424ec3f42f5b5p-53,
+ 0x1.e502ee78b3ff6p+0, 0x1.39e8980a9cc8fp-55,
+ 0x1.e7a51fbc74c83p+0, 0x1.2d522ca0c8de2p-54,
+ 0x1.ea4afa2a490d9p+0, 0x1.0b1ee7431ebb6p-53,
+ 0x1.ecf482d8e67f0p+0, 0x1.1b60625f7293ap-53,
+ 0x1.efa1bee615a27p+0, 0x1.dc7f486a4b6b0p-54,
+ 0x1.f252b376bba97p+0, 0x1.3a1a5bf0d8e43p-54,
+ 0x1.f50765b6e4540p+0, 0x1.9d3e12dd8a18bp-54,
+ 0x1.f7bfdad9cbe13p+0, 0x1.1227697fce57bp-53,
+ 0x1.fa7c1819e90d8p+0, 0x1.74853f3a5931ep-55,
+ 0x1.fd3c22b8f71f1p+0, 0x1.2eb74966579e7p-57
+};
+
+long double
+expl(long double x)
+{
+ union IEEEl2bits u, v;
+ long double fn, q, r, r1, r2, t, t23, t45, twopk, twopkp10000, z;
+ int k, n, n2;
+ uint16_t hx, ix;
+
+ /* Filter out exceptional cases. */
+ u.e = x;
+ hx = u.xbits.expsign;
+ ix = hx & 0x7fff;
+ if (ix >= BIAS + 13) { /* |x| >= 8192 or x is NaN */
+ if (ix == BIAS + LDBL_MAX_EXP) {
+ if (hx & 0x8000 && u.xbits.man == 1ULL << 63)
+ return (0.0L); /* x is -Inf */
+ return (x + x); /* x is +Inf, NaN or unsupported */
+ }
+ if (x > o_threshold.e)
+ return (huge * huge);
+ if (x < u_threshold.e)
+ return (tiny * tiny);
+ } else if (ix < BIAS - 66) { /* |x| < 0x1p-66 */
+ /* includes pseudo-denormals */
+ if (huge + x > 1.0L) /* trigger inexact iff x != 0 */
+ return (1.0L + x);
+ }
+
+ ENTERI();
+
+ /* Reduce x to (k*ln2 + midpoint[n2] + r1 + r2). */
+ /* Use a specialized rint() to get fn. Assume round-to-nearest. */
+ fn = x * INV_L + 0x1.8p63 - 0x1.8p63;
+ r = x - fn * L1 - fn * L2; /* r = r1 + r2 done independently. */
+#if defined(HAVE_EFFICIENT_IRINTL)
+ n = irintl(fn);
+#elif defined(HAVE_EFFICIENT_IRINT)
+ n = irint(fn);
+#else
+ n = (int)fn;
+#endif
+ n2 = (unsigned)n % INTERVALS;
+ k = (n - n2) / INTERVALS;
+ r1 = x - fn * L1;
+ r2 = -fn * L2;
+
+ /* Prepare scale factors. */
+ v.xbits.man = 1ULL << 63;
+ if (k >= LDBL_MIN_EXP) {
+ v.xbits.expsign = BIAS + k;
+ twopk = v.e;
+ } else {
+ v.xbits.expsign = BIAS + k + 10000;
+ twopkp10000 = v.e;
+ }
+
+ /* Evaluate expl(midpoint[n2] + r1 + r2) = s[n2] * expl(r1 + r2). */
+ /* Here q = q(r), not q(r1), since r1 is lopped like L1. */
+ t45 = r * P5 + P4;
+ z = r * r;
+ t23 = r * P3 + P2;
+ q = r2 + z * t23 + z * z * t45 + z * z * z * P6;
+ t = (long double)s[n2].lo + s[n2].hi;
+ t = s[n2].lo + t * (q + r1) + s[n2].hi;
+
+ /* Scale by 2**k. */
+ if (k >= LDBL_MIN_EXP) {
+ if (k == LDBL_MAX_EXP)
+ RETURNI(t * 2.0L * 0x1p16383L);
+ RETURNI(t * twopk);
+ } else {
+ RETURNI(t * twopkp10000 * twom10000);
+ }
+}
diff --git a/lib/msun/man/cexp.3 b/lib/msun/man/cexp.3
index 59bb1cd..97e36c1 100644
--- a/lib/msun/man/cexp.3
+++ b/lib/msun/man/cexp.3
@@ -59,17 +59,17 @@ behaves according to Euler's formula:
.Bd -ragged -offset indent
.Fn cexp "x + I*y"
=
-.Ns ( Sy e Ns ** Ns
+.Po Sy e Ns ** Ns
.Fa x *
-.Em cos Ns ( Ns
-.Fa y Ns )) + ( Ns
+.Em cos Ns Po Ns
+.Fa y Ns Pc Pc + Po Ns
.Sy I
*
.Sy e Ns ** Ns
.Fa x
*
-.Em sin Ns ( Ns
-.Fa y Ns ))
+.Em sin Ns Po Ns
+.Fa y Ns Pc Pc
.Ed
.Pp
Generally speaking, infinities, zeroes and \*(Nas are handled as would
diff --git a/lib/msun/man/exp.3 b/lib/msun/man/exp.3
index b051e5b..5907337 100644
--- a/lib/msun/man/exp.3
+++ b/lib/msun/man/exp.3
@@ -28,13 +28,14 @@
.\" from: @(#)exp.3 6.12 (Berkeley) 7/31/91
.\" $FreeBSD$
.\"
-.Dd January 17, 2008
+.Dd July 10, 2012
.Dt EXP 3
.Os
.Sh NAME
.Nm exp ,
.Nm expf ,
-.\" The sorting error is intentional. exp and expf should be adjacent.
+.Nm expl ,
+.\" The sorting error is intentional. exp, expf, and expl should be adjacent.
.Nm exp2 ,
.Nm exp2f ,
.Nm exp2l ,
@@ -51,6 +52,8 @@
.Fn exp "double x"
.Ft float
.Fn expf "float x"
+.Ft long double
+.Fn expl "long double x"
.Ft double
.Fn exp2 "double x"
.Ft float
@@ -67,9 +70,10 @@
.Fn powf "float x" "float y"
.Sh DESCRIPTION
The
-.Fn exp
-and the
-.Fn expf
+.Fn exp ,
+.Fn expf ,
+and
+.Fn expl
functions compute the base
.Ms e
exponential value of the given argument
diff --git a/lib/msun/man/ieee.3 b/lib/msun/man/ieee.3
index 57e1fcd..5c1c531 100644
--- a/lib/msun/man/ieee.3
+++ b/lib/msun/man/ieee.3
@@ -156,59 +156,60 @@ Wordsize: 32 bits.
.Pp
Precision: 24 significant bits,
roughly like 7 significant decimals.
-.Bd -ragged -offset indent -compact
+.Pp
If x and x' are consecutive positive single-precision
numbers (they differ by 1
.Em ulp ) ,
then
-.Bd -ragged -compact
+.Bl -column "XXX" -compact
5.9e\-08 < 0.5**24 < (x'\-x)/x \(<= 0.5**23 < 1.2e\-07.
-.Ed
-.Ed
+.El
.Pp
.Bl -column "XXX" -compact
Range: Overflow threshold = 2.0**128 = 3.4e38
Underflow threshold = 0.5**126 = 1.2e\-38
.El
-.Bd -ragged -offset indent -compact
+.Pp
Underflowed results round to the nearest
-integer multiple of 0.5**149 = 1.4e\-45.
-.Ed
+integer multiple of
+.Bl -column "XXX" -compact
+0.5**149 = 1.4e\-45.
+.El
.Ed
.Pp
Double-precision:
.Bd -ragged -offset indent -compact
Type name:
.Vt double
-.Bd -ragged -offset indent -compact
-On some architectures,
+.Po On some architectures,
.Vt long double
is the same as
-.Vt double .
-.Ed
+.Vt double
+.Pc
.Pp
Wordsize: 64 bits.
.Pp
Precision: 53 significant bits,
roughly like 16 significant decimals.
-.Bd -ragged -offset indent -compact
+.Pp
If x and x' are consecutive positive double-precision
numbers (they differ by 1
.Em ulp ) ,
then
-.Bd -ragged -compact
+.Bl -column "XXX" -compact
1.1e\-16 < 0.5**53 < (x'\-x)/x \(<= 0.5**52 < 2.3e\-16.
-.Ed
-.Ed
+.El
.Pp
.Bl -column "XXX" -compact
Range: Overflow threshold = 2.0**1024 = 1.8e308
Underflow threshold = 0.5**1022 = 2.2e\-308
.El
-.Bd -ragged -offset indent -compact
+.Pp
Underflowed results round to the nearest
-integer multiple of 0.5**1074 = 4.9e\-324.
-.Ed
+integer multiple of
+.Bl -column "XXX" -compact
+0.5**1074 = 4.9e\-324.
+.El
.Ed
.Pp
Extended-precision:
@@ -221,24 +222,25 @@ Wordsize: 96 bits.
.Pp
Precision: 64 significant bits,
roughly like 19 significant decimals.
-.Bd -ragged -offset indent -compact
+.Pp
If x and x' are consecutive positive extended-precision
numbers (they differ by 1
.Em ulp ) ,
then
-.Bd -ragged -compact
+.Bl -column "XXX" -compact
1.0e\-19 < 0.5**63 < (x'\-x)/x \(<= 0.5**62 < 2.2e\-19.
-.Ed
-.Ed
+.El
.Pp
.Bl -column "XXX" -compact
Range: Overflow threshold = 2.0**16384 = 1.2e4932
Underflow threshold = 0.5**16382 = 3.4e\-4932
.El
-.Bd -ragged -offset indent -compact
+.Pp
Underflowed results round to the nearest
-integer multiple of 0.5**16445 = 5.7e\-4953.
-.Ed
+integer multiple of
+.Bl -column "XXX" -compact
+0.5**16445 = 5.7e\-4953.
+.El
.Ed
.Pp
Quad-extended-precision:
@@ -251,24 +253,25 @@ Wordsize: 128 bits.
.Pp
Precision: 113 significant bits,
roughly like 34 significant decimals.
-.Bd -ragged -offset indent -compact
+.Pp
If x and x' are consecutive positive quad-extended-precision
numbers (they differ by 1
.Em ulp ) ,
then
-.Bd -ragged -compact
+.Bl -column "XXX" -compact
9.6e\-35 < 0.5**113 < (x'\-x)/x \(<= 0.5**112 < 2.0e\-34.
-.Ed
-.Ed
+.El
.Pp
.Bl -column "XXX" -compact
Range: Overflow threshold = 2.0**16384 = 1.2e4932
Underflow threshold = 0.5**16382 = 3.4e\-4932
.El
-.Bd -ragged -offset indent -compact
+.Pp
Underflowed results round to the nearest
-integer multiple of 0.5**16494 = 6.5e\-4966.
-.Ed
+integer multiple of
+.Bl -column "XXX" -compact
+0.5**16494 = 6.5e\-4966.
+.El
.Ed
.Ss Additional Information Regarding Exceptions
For each kind of floating-point exception, IEEE 754
diff --git a/lib/msun/src/e_exp.c b/lib/msun/src/e_exp.c
index b47aef5..e432bc8 100644
--- a/lib/msun/src/e_exp.c
+++ b/lib/msun/src/e_exp.c
@@ -158,3 +158,7 @@ __ieee754_exp(double x) /* default IEEE double exp */
return y*twopk*twom1000;
}
}
+
+#if (LDBL_MANT_DIG == 53)
+__weak_reference(exp, expl);
+#endif
diff --git a/lib/msun/src/e_rem_pio2.c b/lib/msun/src/e_rem_pio2.c
index fde9660..be2630b 100644
--- a/lib/msun/src/e_rem_pio2.c
+++ b/lib/msun/src/e_rem_pio2.c
@@ -48,10 +48,10 @@ pio2_2t = 2.02226624879595063154e-21, /* 0x3BA3198A, 0x2E037073 */
pio2_3 = 2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */
pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
-#ifndef INLINE_REM_PIO2
-extern
+#ifdef INLINE_REM_PIO2
+static __inline __always_inline
#endif
-__inline int
+int
__ieee754_rem_pio2(double x, double *y)
{
double z,w,t,r,fn;
diff --git a/lib/msun/src/e_rem_pio2f.c b/lib/msun/src/e_rem_pio2f.c
index fb608d1..f1ee7a0 100644
--- a/lib/msun/src/e_rem_pio2f.c
+++ b/lib/msun/src/e_rem_pio2f.c
@@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$");
/*
* invpio2: 53 bits of 2/pi
- * pio2_1: first 33 bit of pi/2
+ * pio2_1: first 25 bits of pi/2
* pio2_1t: pi/2 - pio2_1
*/
@@ -40,10 +40,10 @@ invpio2 = 6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */
pio2_1 = 1.57079631090164184570e+00, /* 0x3FF921FB, 0x50000000 */
pio2_1t = 1.58932547735281966916e-08; /* 0x3E5110b4, 0x611A6263 */
-#ifndef INLINE_REM_PIO2F
-extern
+#ifdef INLINE_REM_PIO2F
+static __inline __always_inline
#endif
-__inline int
+int
__ieee754_rem_pio2f(float x, double *y)
{
double w,r,fn;
diff --git a/lib/msun/src/k_cosf.c b/lib/msun/src/k_cosf.c
index 92bce48..f7a2c0a 100644
--- a/lib/msun/src/k_cosf.c
+++ b/lib/msun/src/k_cosf.c
@@ -30,10 +30,10 @@ C1 = 0x155553e1053a42.0p-57, /* 0.0416666233237390631894 */
C2 = -0x16c087e80f1e27.0p-62, /* -0.00138867637746099294692 */
C3 = 0x199342e0ee5069.0p-68; /* 0.0000243904487962774090654 */
-#ifndef INLINE_KERNEL_COSDF
-extern
+#ifdef INLINE_KERNEL_COSDF
+static __inline
#endif
-__inline float
+float
__kernel_cosdf(double x)
{
double r, w, z;
diff --git a/lib/msun/src/k_sinf.c b/lib/msun/src/k_sinf.c
index aa4f268..0841759 100644
--- a/lib/msun/src/k_sinf.c
+++ b/lib/msun/src/k_sinf.c
@@ -29,10 +29,10 @@ S2 = 0x111110896efbb2.0p-59, /* 0.0083333293858894631756 */
S3 = -0x1a00f9e2cae774.0p-65, /* -0.000198393348360966317347 */
S4 = 0x16cd878c3b46a7.0p-71; /* 0.0000027183114939898219064 */
-#ifndef INLINE_KERNEL_SINDF
-extern
+#ifdef INLINE_KERNEL_SINDF
+static __inline
#endif
-__inline float
+float
__kernel_sindf(double x)
{
double r, s, w, z;
diff --git a/lib/msun/src/k_tanf.c b/lib/msun/src/k_tanf.c
index 6b073da..52f1aaa 100644
--- a/lib/msun/src/k_tanf.c
+++ b/lib/msun/src/k_tanf.c
@@ -32,10 +32,10 @@ T[] = {
0x1362b9bf971bcd.0p-59, /* 0.00946564784943673166728 */
};
-#ifndef INLINE_KERNEL_TANDF
-extern
+#ifdef INLINE_KERNEL_TANDF
+static __inline
#endif
-__inline float
+float
__kernel_tandf(double x, int iy)
{
double z,r,w,s,t,u;
diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h
index cf34583..c6cee13 100644
--- a/lib/msun/src/math.h
+++ b/lib/msun/src/math.h
@@ -404,6 +404,7 @@ long double ceill(long double);
long double copysignl(long double, long double) __pure2;
long double cosl(long double);
long double exp2l(long double);
+long double expl(long double);
long double fabsl(long double) __pure2;
long double fdiml(long double, long double);
long double floorl(long double);
@@ -461,7 +462,6 @@ long double atanhl(long double);
long double coshl(long double);
long double erfcl(long double);
long double erfl(long double);
-long double expl(long double);
long double expm1l(long double);
long double lgammal(long double);
long double log10l(long double);
diff --git a/lib/msun/src/math_private.h b/lib/msun/src/math_private.h
index 79280e3..5662df0 100644
--- a/lib/msun/src/math_private.h
+++ b/lib/msun/src/math_private.h
@@ -207,6 +207,17 @@ do { \
(d) = se_u.e; \
} while (0)
+#ifdef __i386__
+/* Long double constants are broken on i386. */
+#define LD80C(m, ex, v) { \
+ .xbits.man = __CONCAT(m, ULL), \
+ .xbits.expsign = (0x3fff + (ex)) | ((v) < 0 ? 0x8000 : 0), \
+}
+#else
+/* The above works on non-i386 too, but we use this to check v. */
+#define LD80C(m, ex, v) { .e = (v), }
+#endif
+
#ifdef FLT_EVAL_METHOD
/*
* Attempt to get strict C99 semantics for assignment with non-C99 compilers.
@@ -217,7 +228,7 @@ do { \
#define STRICT_ASSIGN(type, lval, rval) do { \
volatile type __lval; \
\
- if (sizeof(type) >= sizeof(double)) \
+ if (sizeof(type) >= sizeof(long double)) \
(lval) = (rval); \
else { \
__lval = (rval); \
@@ -225,8 +236,30 @@ do { \
} \
} while (0)
#endif
+#endif /* FLT_EVAL_METHOD */
+
+/* Support switching the mode to FP_PE if necessary. */
+#if defined(__i386__) && !defined(NO_FPSETPREC)
+#define ENTERI() \
+ long double __retval; \
+ fp_prec_t __oprec; \
+ \
+ if ((__oprec = fpgetprec()) != FP_PE) \
+ fpsetprec(FP_PE)
+#define RETURNI(x) do { \
+ __retval = (x); \
+ if (__oprec != FP_PE) \
+ fpsetprec(__oprec); \
+ RETURNF(__retval); \
+} while (0)
+#else
+#define ENTERI(x)
+#define RETURNI(x) RETURNF(x)
#endif
+/* Default return statement if hack*_t() is not used. */
+#define RETURNF(v) return (v)
+
/*
* Common routine to process the arguments to nan(), nanf(), and nanl().
*/
@@ -323,6 +356,18 @@ irint(double x)
#define HAVE_EFFICIENT_IRINT
#endif
+#if defined(__amd64__) || defined(__i386__)
+static __inline int
+irintl(long double x)
+{
+ int n;
+
+ asm("fistl %0" : "=m" (n) : "t" (x));
+ return (n);
+}
+#define HAVE_EFFICIENT_IRINTL
+#endif
+
#endif /* __GNUCLIKE_ASM */
/*
@@ -390,10 +435,9 @@ irint(double x)
int __kernel_rem_pio2(double*,double*,int,int,int);
/* double precision kernel functions */
-#ifdef INLINE_REM_PIO2
-__inline
-#endif
+#ifndef INLINE_REM_PIO2
int __ieee754_rem_pio2(double,double*);
+#endif
double __kernel_sin(double,double,int);
double __kernel_cos(double,double);
double __kernel_tan(double,double,int);
@@ -403,22 +447,18 @@ double complex __ldexp_cexp(double complex,int);
#endif
/* float precision kernel functions */
-#ifdef INLINE_REM_PIO2F
-__inline
-#endif
+#ifndef INLINE_REM_PIO2F
int __ieee754_rem_pio2f(float,double*);
-#ifdef INLINE_KERNEL_SINDF
-__inline
#endif
+#ifndef INLINE_KERNEL_SINDF
float __kernel_sindf(double);
-#ifdef INLINE_KERNEL_COSDF
-__inline
#endif
+#ifndef INLINE_KERNEL_COSDF
float __kernel_cosdf(double);
-#ifdef INLINE_KERNEL_TANDF
-__inline
#endif
+#ifndef INLINE_KERNEL_TANDF
float __kernel_tandf(double,int);
+#endif
float __ldexp_expf(float,int);
#ifdef _COMPLEX_H
float complex __ldexp_cexpf(float complex,int);
diff --git a/lib/msun/src/s_cbrtl.c b/lib/msun/src/s_cbrtl.c
index 23c9184..2236c0f 100644
--- a/lib/msun/src/s_cbrtl.c
+++ b/lib/msun/src/s_cbrtl.c
@@ -18,7 +18,9 @@
__FBSDID("$FreeBSD$");
#include <float.h>
+#ifdef __i386__
#include <ieeefp.h>
+#endif
#include "fpmath.h"
#include "math.h"
@@ -51,23 +53,11 @@ cbrtl(long double x)
if (k == BIAS + LDBL_MAX_EXP)
return (x + x);
-#ifdef __i386__
- fp_prec_t oprec;
-
- oprec = fpgetprec();
- if (oprec != FP_PE)
- fpsetprec(FP_PE);
-#endif
-
+ ENTERI();
if (k == 0) {
/* If x = +-0, then cbrt(x) = +-0. */
- if ((u.bits.manh | u.bits.manl) == 0) {
-#ifdef __i386__
- if (oprec != FP_PE)
- fpsetprec(oprec);
-#endif
- return (x);
- }
+ if ((u.bits.manh | u.bits.manl) == 0)
+ RETURNI(x);
/* Adjust subnormal numbers. */
u.e *= 0x1.0p514;
k = u.bits.exp;
@@ -149,9 +139,5 @@ cbrtl(long double x)
t=t+t*r; /* error <= 0.5 + 0.5/3 + epsilon */
t *= v.e;
-#ifdef __i386__
- if (oprec != FP_PE)
- fpsetprec(oprec);
-#endif
- return (t);
+ RETURNI(t);
}
diff --git a/lib/msun/src/s_cosl.c b/lib/msun/src/s_cosl.c
index 8d43626..22e74cf 100644
--- a/lib/msun/src/s_cosl.c
+++ b/lib/msun/src/s_cosl.c
@@ -33,6 +33,9 @@ __FBSDID("$FreeBSD$");
*/
#include <float.h>
+#ifdef __i386__
+#include <ieeefp.h>
+#endif
#include "math.h"
#include "math_private.h"
@@ -63,9 +66,11 @@ cosl(long double x)
if (z.bits.exp == 32767)
return ((x - x) / (x - x));
+ ENTERI();
+
/* Optimize the case where x is already within range. */
if (z.e < M_PI_4)
- return (__kernel_cosl(z.e, 0));
+ RETURNI(__kernel_cosl(z.e, 0));
e0 = __ieee754_rem_pio2l(x, y);
hi = y[0];
@@ -86,5 +91,5 @@ cosl(long double x)
break;
}
- return (hi);
+ RETURNI(hi);
}
diff --git a/lib/msun/src/s_sinl.c b/lib/msun/src/s_sinl.c
index 919deb9..f454f8f 100644
--- a/lib/msun/src/s_sinl.c
+++ b/lib/msun/src/s_sinl.c
@@ -28,6 +28,9 @@
__FBSDID("$FreeBSD$");
#include <float.h>
+#ifdef __i386__
+#include <ieeefp.h>
+#endif
#include "math.h"
#include "math_private.h"
@@ -59,10 +62,12 @@ sinl(long double x)
if (z.bits.exp == 32767)
return ((x - x) / (x - x));
+ ENTERI();
+
/* Optimize the case where x is already within range. */
if (z.e < M_PI_4) {
hi = __kernel_sinl(z.e, 0, 0);
- return (s ? -hi : hi);
+ RETURNI(s ? -hi : hi);
}
e0 = __ieee754_rem_pio2l(x, y);
@@ -84,5 +89,5 @@ sinl(long double x)
break;
}
- return (hi);
+ RETURNI(hi);
}
diff --git a/lib/msun/src/s_tanl.c b/lib/msun/src/s_tanl.c
index 9562cf8..eadc837 100644
--- a/lib/msun/src/s_tanl.c
+++ b/lib/msun/src/s_tanl.c
@@ -34,6 +34,9 @@ __FBSDID("$FreeBSD$");
*/
#include <float.h>
+#ifdef __i386__
+#include <ieeefp.h>
+#endif
#include "math.h"
#include "math_private.h"
@@ -65,10 +68,12 @@ tanl(long double x)
if (z.bits.exp == 32767)
return ((x - x) / (x - x));
+ ENTERI();
+
/* Optimize the case where x is already within range. */
if (z.e < M_PI_4) {
hi = __kernel_tanl(z.e, 0, 0);
- return (s ? -hi : hi);
+ RETURNI(s ? -hi : hi);
}
e0 = __ieee754_rem_pio2l(x, y);
@@ -86,5 +91,5 @@ tanl(long double x)
break;
}
- return (hi);
+ RETURNI(hi);
}
diff --git a/lib/ncurses/form/Makefile.depend b/lib/ncurses/form/Makefile.depend
new file mode 100644
index 0000000..2ca7d7a
--- /dev/null
+++ b/lib/ncurses/form/Makefile.depend
@@ -0,0 +1,134 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/ncurses/ncurses \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+fld_arg.So: ncurses_def.h
+fld_arg.o: ncurses_def.h
+fld_arg.po: ncurses_def.h
+fld_attr.So: ncurses_def.h
+fld_attr.o: ncurses_def.h
+fld_attr.po: ncurses_def.h
+fld_current.So: ncurses_def.h
+fld_current.o: ncurses_def.h
+fld_current.po: ncurses_def.h
+fld_def.So: ncurses_def.h
+fld_def.o: ncurses_def.h
+fld_def.po: ncurses_def.h
+fld_dup.So: ncurses_def.h
+fld_dup.o: ncurses_def.h
+fld_dup.po: ncurses_def.h
+fld_ftchoice.So: ncurses_def.h
+fld_ftchoice.o: ncurses_def.h
+fld_ftchoice.po: ncurses_def.h
+fld_ftlink.So: ncurses_def.h
+fld_ftlink.o: ncurses_def.h
+fld_ftlink.po: ncurses_def.h
+fld_info.So: ncurses_def.h
+fld_info.o: ncurses_def.h
+fld_info.po: ncurses_def.h
+fld_just.So: ncurses_def.h
+fld_just.o: ncurses_def.h
+fld_just.po: ncurses_def.h
+fld_link.So: ncurses_def.h
+fld_link.o: ncurses_def.h
+fld_link.po: ncurses_def.h
+fld_max.So: ncurses_def.h
+fld_max.o: ncurses_def.h
+fld_max.po: ncurses_def.h
+fld_move.So: ncurses_def.h
+fld_move.o: ncurses_def.h
+fld_move.po: ncurses_def.h
+fld_newftyp.So: ncurses_def.h
+fld_newftyp.o: ncurses_def.h
+fld_newftyp.po: ncurses_def.h
+fld_opts.So: ncurses_def.h
+fld_opts.o: ncurses_def.h
+fld_opts.po: ncurses_def.h
+fld_pad.So: ncurses_def.h
+fld_pad.o: ncurses_def.h
+fld_pad.po: ncurses_def.h
+fld_page.So: ncurses_def.h
+fld_page.o: ncurses_def.h
+fld_page.po: ncurses_def.h
+fld_stat.So: ncurses_def.h
+fld_stat.o: ncurses_def.h
+fld_stat.po: ncurses_def.h
+fld_type.So: ncurses_def.h
+fld_type.o: ncurses_def.h
+fld_type.po: ncurses_def.h
+fld_user.So: ncurses_def.h
+fld_user.o: ncurses_def.h
+fld_user.po: ncurses_def.h
+frm_cursor.So: ncurses_def.h
+frm_cursor.o: ncurses_def.h
+frm_cursor.po: ncurses_def.h
+frm_data.So: ncurses_def.h
+frm_data.o: ncurses_def.h
+frm_data.po: ncurses_def.h
+frm_def.So: ncurses_def.h
+frm_def.o: ncurses_def.h
+frm_def.po: ncurses_def.h
+frm_driver.So: ncurses_def.h
+frm_driver.o: ncurses_def.h
+frm_driver.po: ncurses_def.h
+frm_hook.So: ncurses_def.h
+frm_hook.o: ncurses_def.h
+frm_hook.po: ncurses_def.h
+frm_opts.So: ncurses_def.h
+frm_opts.o: ncurses_def.h
+frm_opts.po: ncurses_def.h
+frm_page.So: ncurses_def.h
+frm_page.o: ncurses_def.h
+frm_page.po: ncurses_def.h
+frm_post.So: ncurses_def.h
+frm_post.o: ncurses_def.h
+frm_post.po: ncurses_def.h
+frm_req_name.So: ncurses_def.h
+frm_req_name.o: ncurses_def.h
+frm_req_name.po: ncurses_def.h
+frm_scale.So: ncurses_def.h
+frm_scale.o: ncurses_def.h
+frm_scale.po: ncurses_def.h
+frm_sub.So: ncurses_def.h
+frm_sub.o: ncurses_def.h
+frm_sub.po: ncurses_def.h
+frm_user.So: ncurses_def.h
+frm_user.o: ncurses_def.h
+frm_user.po: ncurses_def.h
+frm_win.So: ncurses_def.h
+frm_win.o: ncurses_def.h
+frm_win.po: ncurses_def.h
+fty_alnum.So: ncurses_def.h
+fty_alnum.o: ncurses_def.h
+fty_alnum.po: ncurses_def.h
+fty_alpha.So: ncurses_def.h
+fty_alpha.o: ncurses_def.h
+fty_alpha.po: ncurses_def.h
+fty_enum.So: ncurses_def.h
+fty_enum.o: ncurses_def.h
+fty_enum.po: ncurses_def.h
+fty_int.So: ncurses_def.h
+fty_int.o: ncurses_def.h
+fty_int.po: ncurses_def.h
+fty_ipv4.So: ncurses_def.h
+fty_ipv4.o: ncurses_def.h
+fty_ipv4.po: ncurses_def.h
+fty_num.So: ncurses_def.h
+fty_num.o: ncurses_def.h
+fty_num.po: ncurses_def.h
+fty_regex.So: ncurses_def.h
+fty_regex.o: ncurses_def.h
+fty_regex.po: ncurses_def.h
+.endif
diff --git a/lib/ncurses/formw/Makefile.depend b/lib/ncurses/formw/Makefile.depend
new file mode 100644
index 0000000..f21c8a2
--- /dev/null
+++ b/lib/ncurses/formw/Makefile.depend
@@ -0,0 +1,134 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/ncurses/ncursesw \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+fld_arg.So: ncurses_def.h
+fld_arg.o: ncurses_def.h
+fld_arg.po: ncurses_def.h
+fld_attr.So: ncurses_def.h
+fld_attr.o: ncurses_def.h
+fld_attr.po: ncurses_def.h
+fld_current.So: ncurses_def.h
+fld_current.o: ncurses_def.h
+fld_current.po: ncurses_def.h
+fld_def.So: ncurses_def.h
+fld_def.o: ncurses_def.h
+fld_def.po: ncurses_def.h
+fld_dup.So: ncurses_def.h
+fld_dup.o: ncurses_def.h
+fld_dup.po: ncurses_def.h
+fld_ftchoice.So: ncurses_def.h
+fld_ftchoice.o: ncurses_def.h
+fld_ftchoice.po: ncurses_def.h
+fld_ftlink.So: ncurses_def.h
+fld_ftlink.o: ncurses_def.h
+fld_ftlink.po: ncurses_def.h
+fld_info.So: ncurses_def.h
+fld_info.o: ncurses_def.h
+fld_info.po: ncurses_def.h
+fld_just.So: ncurses_def.h
+fld_just.o: ncurses_def.h
+fld_just.po: ncurses_def.h
+fld_link.So: ncurses_def.h
+fld_link.o: ncurses_def.h
+fld_link.po: ncurses_def.h
+fld_max.So: ncurses_def.h
+fld_max.o: ncurses_def.h
+fld_max.po: ncurses_def.h
+fld_move.So: ncurses_def.h
+fld_move.o: ncurses_def.h
+fld_move.po: ncurses_def.h
+fld_newftyp.So: ncurses_def.h
+fld_newftyp.o: ncurses_def.h
+fld_newftyp.po: ncurses_def.h
+fld_opts.So: ncurses_def.h
+fld_opts.o: ncurses_def.h
+fld_opts.po: ncurses_def.h
+fld_pad.So: ncurses_def.h
+fld_pad.o: ncurses_def.h
+fld_pad.po: ncurses_def.h
+fld_page.So: ncurses_def.h
+fld_page.o: ncurses_def.h
+fld_page.po: ncurses_def.h
+fld_stat.So: ncurses_def.h
+fld_stat.o: ncurses_def.h
+fld_stat.po: ncurses_def.h
+fld_type.So: ncurses_def.h
+fld_type.o: ncurses_def.h
+fld_type.po: ncurses_def.h
+fld_user.So: ncurses_def.h
+fld_user.o: ncurses_def.h
+fld_user.po: ncurses_def.h
+frm_cursor.So: ncurses_def.h
+frm_cursor.o: ncurses_def.h
+frm_cursor.po: ncurses_def.h
+frm_data.So: ncurses_def.h
+frm_data.o: ncurses_def.h
+frm_data.po: ncurses_def.h
+frm_def.So: ncurses_def.h
+frm_def.o: ncurses_def.h
+frm_def.po: ncurses_def.h
+frm_driver.So: ncurses_def.h
+frm_driver.o: ncurses_def.h
+frm_driver.po: ncurses_def.h
+frm_hook.So: ncurses_def.h
+frm_hook.o: ncurses_def.h
+frm_hook.po: ncurses_def.h
+frm_opts.So: ncurses_def.h
+frm_opts.o: ncurses_def.h
+frm_opts.po: ncurses_def.h
+frm_page.So: ncurses_def.h
+frm_page.o: ncurses_def.h
+frm_page.po: ncurses_def.h
+frm_post.So: ncurses_def.h
+frm_post.o: ncurses_def.h
+frm_post.po: ncurses_def.h
+frm_req_name.So: ncurses_def.h
+frm_req_name.o: ncurses_def.h
+frm_req_name.po: ncurses_def.h
+frm_scale.So: ncurses_def.h
+frm_scale.o: ncurses_def.h
+frm_scale.po: ncurses_def.h
+frm_sub.So: ncurses_def.h
+frm_sub.o: ncurses_def.h
+frm_sub.po: ncurses_def.h
+frm_user.So: ncurses_def.h
+frm_user.o: ncurses_def.h
+frm_user.po: ncurses_def.h
+frm_win.So: ncurses_def.h
+frm_win.o: ncurses_def.h
+frm_win.po: ncurses_def.h
+fty_alnum.So: ncurses_def.h
+fty_alnum.o: ncurses_def.h
+fty_alnum.po: ncurses_def.h
+fty_alpha.So: ncurses_def.h
+fty_alpha.o: ncurses_def.h
+fty_alpha.po: ncurses_def.h
+fty_enum.So: ncurses_def.h
+fty_enum.o: ncurses_def.h
+fty_enum.po: ncurses_def.h
+fty_int.So: ncurses_def.h
+fty_int.o: ncurses_def.h
+fty_int.po: ncurses_def.h
+fty_ipv4.So: ncurses_def.h
+fty_ipv4.o: ncurses_def.h
+fty_ipv4.po: ncurses_def.h
+fty_num.So: ncurses_def.h
+fty_num.o: ncurses_def.h
+fty_num.po: ncurses_def.h
+fty_regex.So: ncurses_def.h
+fty_regex.o: ncurses_def.h
+fty_regex.po: ncurses_def.h
+.endif
diff --git a/lib/ncurses/menu/Makefile.depend b/lib/ncurses/menu/Makefile.depend
new file mode 100644
index 0000000..b4dee6d
--- /dev/null
+++ b/lib/ncurses/menu/Makefile.depend
@@ -0,0 +1,95 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/ncurses/ncurses \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+m_attribs.So: ncurses_def.h
+m_attribs.o: ncurses_def.h
+m_attribs.po: ncurses_def.h
+m_cursor.So: ncurses_def.h
+m_cursor.o: ncurses_def.h
+m_cursor.po: ncurses_def.h
+m_driver.So: ncurses_def.h
+m_driver.o: ncurses_def.h
+m_driver.po: ncurses_def.h
+m_format.So: ncurses_def.h
+m_format.o: ncurses_def.h
+m_format.po: ncurses_def.h
+m_global.So: ncurses_def.h
+m_global.o: ncurses_def.h
+m_global.po: ncurses_def.h
+m_hook.So: ncurses_def.h
+m_hook.o: ncurses_def.h
+m_hook.po: ncurses_def.h
+m_item_cur.So: ncurses_def.h
+m_item_cur.o: ncurses_def.h
+m_item_cur.po: ncurses_def.h
+m_item_nam.So: ncurses_def.h
+m_item_nam.o: ncurses_def.h
+m_item_nam.po: ncurses_def.h
+m_item_new.So: ncurses_def.h
+m_item_new.o: ncurses_def.h
+m_item_new.po: ncurses_def.h
+m_item_opt.So: ncurses_def.h
+m_item_opt.o: ncurses_def.h
+m_item_opt.po: ncurses_def.h
+m_item_top.So: ncurses_def.h
+m_item_top.o: ncurses_def.h
+m_item_top.po: ncurses_def.h
+m_item_use.So: ncurses_def.h
+m_item_use.o: ncurses_def.h
+m_item_use.po: ncurses_def.h
+m_item_val.So: ncurses_def.h
+m_item_val.o: ncurses_def.h
+m_item_val.po: ncurses_def.h
+m_item_vis.So: ncurses_def.h
+m_item_vis.o: ncurses_def.h
+m_item_vis.po: ncurses_def.h
+m_items.So: ncurses_def.h
+m_items.o: ncurses_def.h
+m_items.po: ncurses_def.h
+m_new.So: ncurses_def.h
+m_new.o: ncurses_def.h
+m_new.po: ncurses_def.h
+m_opts.So: ncurses_def.h
+m_opts.o: ncurses_def.h
+m_opts.po: ncurses_def.h
+m_pad.So: ncurses_def.h
+m_pad.o: ncurses_def.h
+m_pad.po: ncurses_def.h
+m_pattern.So: ncurses_def.h
+m_pattern.o: ncurses_def.h
+m_pattern.po: ncurses_def.h
+m_post.So: ncurses_def.h
+m_post.o: ncurses_def.h
+m_post.po: ncurses_def.h
+m_req_name.So: ncurses_def.h
+m_req_name.o: ncurses_def.h
+m_req_name.po: ncurses_def.h
+m_scale.So: ncurses_def.h
+m_scale.o: ncurses_def.h
+m_scale.po: ncurses_def.h
+m_spacing.So: ncurses_def.h
+m_spacing.o: ncurses_def.h
+m_spacing.po: ncurses_def.h
+m_sub.So: ncurses_def.h
+m_sub.o: ncurses_def.h
+m_sub.po: ncurses_def.h
+m_userptr.So: ncurses_def.h
+m_userptr.o: ncurses_def.h
+m_userptr.po: ncurses_def.h
+m_win.So: ncurses_def.h
+m_win.o: ncurses_def.h
+m_win.po: ncurses_def.h
+.endif
diff --git a/lib/ncurses/menuw/Makefile.depend b/lib/ncurses/menuw/Makefile.depend
new file mode 100644
index 0000000..023241d
--- /dev/null
+++ b/lib/ncurses/menuw/Makefile.depend
@@ -0,0 +1,95 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/ncurses/ncursesw \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+m_attribs.So: ncurses_def.h
+m_attribs.o: ncurses_def.h
+m_attribs.po: ncurses_def.h
+m_cursor.So: ncurses_def.h
+m_cursor.o: ncurses_def.h
+m_cursor.po: ncurses_def.h
+m_driver.So: ncurses_def.h
+m_driver.o: ncurses_def.h
+m_driver.po: ncurses_def.h
+m_format.So: ncurses_def.h
+m_format.o: ncurses_def.h
+m_format.po: ncurses_def.h
+m_global.So: ncurses_def.h
+m_global.o: ncurses_def.h
+m_global.po: ncurses_def.h
+m_hook.So: ncurses_def.h
+m_hook.o: ncurses_def.h
+m_hook.po: ncurses_def.h
+m_item_cur.So: ncurses_def.h
+m_item_cur.o: ncurses_def.h
+m_item_cur.po: ncurses_def.h
+m_item_nam.So: ncurses_def.h
+m_item_nam.o: ncurses_def.h
+m_item_nam.po: ncurses_def.h
+m_item_new.So: ncurses_def.h
+m_item_new.o: ncurses_def.h
+m_item_new.po: ncurses_def.h
+m_item_opt.So: ncurses_def.h
+m_item_opt.o: ncurses_def.h
+m_item_opt.po: ncurses_def.h
+m_item_top.So: ncurses_def.h
+m_item_top.o: ncurses_def.h
+m_item_top.po: ncurses_def.h
+m_item_use.So: ncurses_def.h
+m_item_use.o: ncurses_def.h
+m_item_use.po: ncurses_def.h
+m_item_val.So: ncurses_def.h
+m_item_val.o: ncurses_def.h
+m_item_val.po: ncurses_def.h
+m_item_vis.So: ncurses_def.h
+m_item_vis.o: ncurses_def.h
+m_item_vis.po: ncurses_def.h
+m_items.So: ncurses_def.h
+m_items.o: ncurses_def.h
+m_items.po: ncurses_def.h
+m_new.So: ncurses_def.h
+m_new.o: ncurses_def.h
+m_new.po: ncurses_def.h
+m_opts.So: ncurses_def.h
+m_opts.o: ncurses_def.h
+m_opts.po: ncurses_def.h
+m_pad.So: ncurses_def.h
+m_pad.o: ncurses_def.h
+m_pad.po: ncurses_def.h
+m_pattern.So: ncurses_def.h
+m_pattern.o: ncurses_def.h
+m_pattern.po: ncurses_def.h
+m_post.So: ncurses_def.h
+m_post.o: ncurses_def.h
+m_post.po: ncurses_def.h
+m_req_name.So: ncurses_def.h
+m_req_name.o: ncurses_def.h
+m_req_name.po: ncurses_def.h
+m_scale.So: ncurses_def.h
+m_scale.o: ncurses_def.h
+m_scale.po: ncurses_def.h
+m_spacing.So: ncurses_def.h
+m_spacing.o: ncurses_def.h
+m_spacing.po: ncurses_def.h
+m_sub.So: ncurses_def.h
+m_sub.o: ncurses_def.h
+m_sub.po: ncurses_def.h
+m_userptr.So: ncurses_def.h
+m_userptr.o: ncurses_def.h
+m_userptr.po: ncurses_def.h
+m_win.So: ncurses_def.h
+m_win.o: ncurses_def.h
+m_win.po: ncurses_def.h
+.endif
diff --git a/lib/ncurses/ncurses/Makefile.depend b/lib/ncurses/ncurses/Makefile.depend
new file mode 100644
index 0000000..6cc2521
--- /dev/null
+++ b/lib/ncurses/ncurses/Makefile.depend
@@ -0,0 +1,1807 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+access.So: curses.h
+access.So: ncurses_def.h
+access.So: term.h
+access.So: unctrl.h
+access.o: curses.h
+access.o: ncurses_def.h
+access.o: term.h
+access.o: unctrl.h
+access.po: curses.h
+access.po: ncurses_def.h
+access.po: term.h
+access.po: unctrl.h
+add_tries.So: curses.h
+add_tries.So: ncurses_def.h
+add_tries.So: term.h
+add_tries.So: unctrl.h
+add_tries.o: curses.h
+add_tries.o: ncurses_def.h
+add_tries.o: term.h
+add_tries.o: unctrl.h
+add_tries.po: curses.h
+add_tries.po: ncurses_def.h
+add_tries.po: term.h
+add_tries.po: unctrl.h
+alloc_entry.So: curses.h
+alloc_entry.So: ncurses_def.h
+alloc_entry.So: term.h
+alloc_entry.So: unctrl.h
+alloc_entry.o: curses.h
+alloc_entry.o: ncurses_def.h
+alloc_entry.o: term.h
+alloc_entry.o: unctrl.h
+alloc_entry.po: curses.h
+alloc_entry.po: ncurses_def.h
+alloc_entry.po: term.h
+alloc_entry.po: unctrl.h
+alloc_ttype.So: curses.h
+alloc_ttype.So: ncurses_def.h
+alloc_ttype.So: term.h
+alloc_ttype.So: unctrl.h
+alloc_ttype.o: curses.h
+alloc_ttype.o: ncurses_def.h
+alloc_ttype.o: term.h
+alloc_ttype.o: unctrl.h
+alloc_ttype.po: curses.h
+alloc_ttype.po: ncurses_def.h
+alloc_ttype.po: term.h
+alloc_ttype.po: unctrl.h
+captoinfo.So: curses.h
+captoinfo.So: ncurses_def.h
+captoinfo.So: term.h
+captoinfo.So: unctrl.h
+captoinfo.o: curses.h
+captoinfo.o: ncurses_def.h
+captoinfo.o: term.h
+captoinfo.o: unctrl.h
+captoinfo.po: curses.h
+captoinfo.po: ncurses_def.h
+captoinfo.po: term.h
+captoinfo.po: unctrl.h
+codes.So: codes.c
+codes.So: curses.h
+codes.So: ncurses_def.h
+codes.So: term.h
+codes.So: unctrl.h
+codes.o: codes.c
+codes.o: curses.h
+codes.o: ncurses_def.h
+codes.o: term.h
+codes.o: unctrl.h
+codes.po: codes.c
+codes.po: curses.h
+codes.po: ncurses_def.h
+codes.po: term.h
+codes.po: unctrl.h
+comp_captab.So: comp_captab.c
+comp_captab.So: curses.h
+comp_captab.So: hashsize.h
+comp_captab.So: ncurses_def.h
+comp_captab.So: term.h
+comp_captab.So: unctrl.h
+comp_captab.o: comp_captab.c
+comp_captab.o: curses.h
+comp_captab.o: hashsize.h
+comp_captab.o: ncurses_def.h
+comp_captab.o: term.h
+comp_captab.o: unctrl.h
+comp_captab.po: comp_captab.c
+comp_captab.po: curses.h
+comp_captab.po: hashsize.h
+comp_captab.po: ncurses_def.h
+comp_captab.po: term.h
+comp_captab.po: unctrl.h
+comp_error.So: curses.h
+comp_error.So: ncurses_def.h
+comp_error.So: term.h
+comp_error.So: unctrl.h
+comp_error.o: curses.h
+comp_error.o: ncurses_def.h
+comp_error.o: term.h
+comp_error.o: unctrl.h
+comp_error.po: curses.h
+comp_error.po: ncurses_def.h
+comp_error.po: term.h
+comp_error.po: unctrl.h
+comp_expand.So: curses.h
+comp_expand.So: ncurses_def.h
+comp_expand.So: term.h
+comp_expand.So: unctrl.h
+comp_expand.o: curses.h
+comp_expand.o: ncurses_def.h
+comp_expand.o: term.h
+comp_expand.o: unctrl.h
+comp_expand.po: curses.h
+comp_expand.po: ncurses_def.h
+comp_expand.po: term.h
+comp_expand.po: unctrl.h
+comp_hash.So: curses.h
+comp_hash.So: hashsize.h
+comp_hash.So: ncurses_def.h
+comp_hash.So: term.h
+comp_hash.So: unctrl.h
+comp_hash.o: curses.h
+comp_hash.o: hashsize.h
+comp_hash.o: ncurses_def.h
+comp_hash.o: term.h
+comp_hash.o: unctrl.h
+comp_hash.po: curses.h
+comp_hash.po: hashsize.h
+comp_hash.po: ncurses_def.h
+comp_hash.po: term.h
+comp_hash.po: unctrl.h
+comp_parse.So: curses.h
+comp_parse.So: ncurses_def.h
+comp_parse.So: term.h
+comp_parse.So: unctrl.h
+comp_parse.o: curses.h
+comp_parse.o: ncurses_def.h
+comp_parse.o: term.h
+comp_parse.o: unctrl.h
+comp_parse.po: curses.h
+comp_parse.po: ncurses_def.h
+comp_parse.po: term.h
+comp_parse.po: unctrl.h
+comp_scan.So: curses.h
+comp_scan.So: ncurses_def.h
+comp_scan.So: term.h
+comp_scan.So: unctrl.h
+comp_scan.o: curses.h
+comp_scan.o: ncurses_def.h
+comp_scan.o: term.h
+comp_scan.o: unctrl.h
+comp_scan.po: curses.h
+comp_scan.po: ncurses_def.h
+comp_scan.po: term.h
+comp_scan.po: unctrl.h
+db_iterator.So: curses.h
+db_iterator.So: ncurses_def.h
+db_iterator.So: term.h
+db_iterator.So: unctrl.h
+db_iterator.o: curses.h
+db_iterator.o: ncurses_def.h
+db_iterator.o: term.h
+db_iterator.o: unctrl.h
+db_iterator.po: curses.h
+db_iterator.po: ncurses_def.h
+db_iterator.po: term.h
+db_iterator.po: unctrl.h
+define_key.So: curses.h
+define_key.So: ncurses_def.h
+define_key.So: term.h
+define_key.So: unctrl.h
+define_key.o: curses.h
+define_key.o: ncurses_def.h
+define_key.o: term.h
+define_key.o: unctrl.h
+define_key.po: curses.h
+define_key.po: ncurses_def.h
+define_key.po: term.h
+define_key.po: unctrl.h
+doalloc.So: curses.h
+doalloc.So: ncurses_def.h
+doalloc.So: term.h
+doalloc.So: unctrl.h
+doalloc.o: curses.h
+doalloc.o: ncurses_def.h
+doalloc.o: term.h
+doalloc.o: unctrl.h
+doalloc.po: curses.h
+doalloc.po: ncurses_def.h
+doalloc.po: term.h
+doalloc.po: unctrl.h
+entries.So: curses.h
+entries.So: ncurses_def.h
+entries.So: term.h
+entries.So: unctrl.h
+entries.o: curses.h
+entries.o: ncurses_def.h
+entries.o: term.h
+entries.o: unctrl.h
+entries.po: curses.h
+entries.po: ncurses_def.h
+entries.po: term.h
+entries.po: unctrl.h
+expanded.So: curses.h
+expanded.So: expanded.c
+expanded.So: ncurses_def.h
+expanded.So: term.h
+expanded.So: unctrl.h
+expanded.o: curses.h
+expanded.o: expanded.c
+expanded.o: ncurses_def.h
+expanded.o: term.h
+expanded.o: unctrl.h
+expanded.po: curses.h
+expanded.po: expanded.c
+expanded.po: ncurses_def.h
+expanded.po: term.h
+expanded.po: unctrl.h
+fallback.So: curses.h
+fallback.So: fallback.c
+fallback.So: ncurses_def.h
+fallback.So: term.h
+fallback.So: unctrl.h
+fallback.o: curses.h
+fallback.o: fallback.c
+fallback.o: ncurses_def.h
+fallback.o: term.h
+fallback.o: unctrl.h
+fallback.po: curses.h
+fallback.po: fallback.c
+fallback.po: ncurses_def.h
+fallback.po: term.h
+fallback.po: unctrl.h
+free_ttype.So: curses.h
+free_ttype.So: ncurses_def.h
+free_ttype.So: term.h
+free_ttype.So: unctrl.h
+free_ttype.o: curses.h
+free_ttype.o: ncurses_def.h
+free_ttype.o: term.h
+free_ttype.o: unctrl.h
+free_ttype.po: curses.h
+free_ttype.po: ncurses_def.h
+free_ttype.po: term.h
+free_ttype.po: unctrl.h
+getenv_num.So: curses.h
+getenv_num.So: ncurses_def.h
+getenv_num.So: term.h
+getenv_num.So: unctrl.h
+getenv_num.o: curses.h
+getenv_num.o: ncurses_def.h
+getenv_num.o: term.h
+getenv_num.o: unctrl.h
+getenv_num.po: curses.h
+getenv_num.po: ncurses_def.h
+getenv_num.po: term.h
+getenv_num.po: unctrl.h
+hardscroll.So: curses.h
+hardscroll.So: ncurses_def.h
+hardscroll.So: term.h
+hardscroll.So: unctrl.h
+hardscroll.o: curses.h
+hardscroll.o: ncurses_def.h
+hardscroll.o: term.h
+hardscroll.o: unctrl.h
+hardscroll.po: curses.h
+hardscroll.po: ncurses_def.h
+hardscroll.po: term.h
+hardscroll.po: unctrl.h
+hashed_db.So: curses.h
+hashed_db.So: ncurses_def.h
+hashed_db.So: term.h
+hashed_db.So: unctrl.h
+hashed_db.o: curses.h
+hashed_db.o: ncurses_def.h
+hashed_db.o: term.h
+hashed_db.o: unctrl.h
+hashed_db.po: curses.h
+hashed_db.po: ncurses_def.h
+hashed_db.po: term.h
+hashed_db.po: unctrl.h
+hashmap.So: curses.h
+hashmap.So: ncurses_def.h
+hashmap.So: term.h
+hashmap.So: unctrl.h
+hashmap.o: curses.h
+hashmap.o: ncurses_def.h
+hashmap.o: term.h
+hashmap.o: unctrl.h
+hashmap.po: curses.h
+hashmap.po: ncurses_def.h
+hashmap.po: term.h
+hashmap.po: unctrl.h
+home_terminfo.So: curses.h
+home_terminfo.So: ncurses_def.h
+home_terminfo.So: term.h
+home_terminfo.So: unctrl.h
+home_terminfo.o: curses.h
+home_terminfo.o: ncurses_def.h
+home_terminfo.o: term.h
+home_terminfo.o: unctrl.h
+home_terminfo.po: curses.h
+home_terminfo.po: ncurses_def.h
+home_terminfo.po: term.h
+home_terminfo.po: unctrl.h
+init_keytry.So: curses.h
+init_keytry.So: init_keytry.h
+init_keytry.So: ncurses_def.h
+init_keytry.So: term.h
+init_keytry.So: unctrl.h
+init_keytry.o: curses.h
+init_keytry.o: init_keytry.h
+init_keytry.o: ncurses_def.h
+init_keytry.o: term.h
+init_keytry.o: unctrl.h
+init_keytry.po: curses.h
+init_keytry.po: init_keytry.h
+init_keytry.po: ncurses_def.h
+init_keytry.po: term.h
+init_keytry.po: unctrl.h
+key_defined.So: curses.h
+key_defined.So: ncurses_def.h
+key_defined.So: term.h
+key_defined.So: unctrl.h
+key_defined.o: curses.h
+key_defined.o: ncurses_def.h
+key_defined.o: term.h
+key_defined.o: unctrl.h
+key_defined.po: curses.h
+key_defined.po: ncurses_def.h
+key_defined.po: term.h
+key_defined.po: unctrl.h
+keybound.So: curses.h
+keybound.So: ncurses_def.h
+keybound.So: term.h
+keybound.So: unctrl.h
+keybound.o: curses.h
+keybound.o: ncurses_def.h
+keybound.o: term.h
+keybound.o: unctrl.h
+keybound.po: curses.h
+keybound.po: ncurses_def.h
+keybound.po: term.h
+keybound.po: unctrl.h
+keyok.So: curses.h
+keyok.So: ncurses_def.h
+keyok.So: term.h
+keyok.So: unctrl.h
+keyok.o: curses.h
+keyok.o: ncurses_def.h
+keyok.o: term.h
+keyok.o: unctrl.h
+keyok.po: curses.h
+keyok.po: ncurses_def.h
+keyok.po: term.h
+keyok.po: unctrl.h
+legacy_coding.So: curses.h
+legacy_coding.So: ncurses_def.h
+legacy_coding.So: term.h
+legacy_coding.So: unctrl.h
+legacy_coding.o: curses.h
+legacy_coding.o: ncurses_def.h
+legacy_coding.o: term.h
+legacy_coding.o: unctrl.h
+legacy_coding.po: curses.h
+legacy_coding.po: ncurses_def.h
+legacy_coding.po: term.h
+legacy_coding.po: unctrl.h
+lib_acs.So: curses.h
+lib_acs.So: ncurses_def.h
+lib_acs.So: term.h
+lib_acs.So: unctrl.h
+lib_acs.o: curses.h
+lib_acs.o: ncurses_def.h
+lib_acs.o: term.h
+lib_acs.o: unctrl.h
+lib_acs.po: curses.h
+lib_acs.po: ncurses_def.h
+lib_acs.po: term.h
+lib_acs.po: unctrl.h
+lib_addch.So: curses.h
+lib_addch.So: ncurses_def.h
+lib_addch.So: term.h
+lib_addch.So: unctrl.h
+lib_addch.o: curses.h
+lib_addch.o: ncurses_def.h
+lib_addch.o: term.h
+lib_addch.o: unctrl.h
+lib_addch.po: curses.h
+lib_addch.po: ncurses_def.h
+lib_addch.po: term.h
+lib_addch.po: unctrl.h
+lib_addstr.So: curses.h
+lib_addstr.So: ncurses_def.h
+lib_addstr.So: term.h
+lib_addstr.So: unctrl.h
+lib_addstr.o: curses.h
+lib_addstr.o: ncurses_def.h
+lib_addstr.o: term.h
+lib_addstr.o: unctrl.h
+lib_addstr.po: curses.h
+lib_addstr.po: ncurses_def.h
+lib_addstr.po: term.h
+lib_addstr.po: unctrl.h
+lib_baudrate.So: curses.h
+lib_baudrate.So: ncurses_def.h
+lib_baudrate.So: term.h
+lib_baudrate.So: termcap.h
+lib_baudrate.So: unctrl.h
+lib_baudrate.o: curses.h
+lib_baudrate.o: ncurses_def.h
+lib_baudrate.o: term.h
+lib_baudrate.o: termcap.h
+lib_baudrate.o: unctrl.h
+lib_baudrate.po: curses.h
+lib_baudrate.po: ncurses_def.h
+lib_baudrate.po: term.h
+lib_baudrate.po: termcap.h
+lib_baudrate.po: unctrl.h
+lib_beep.So: curses.h
+lib_beep.So: ncurses_def.h
+lib_beep.So: term.h
+lib_beep.So: unctrl.h
+lib_beep.o: curses.h
+lib_beep.o: ncurses_def.h
+lib_beep.o: term.h
+lib_beep.o: unctrl.h
+lib_beep.po: curses.h
+lib_beep.po: ncurses_def.h
+lib_beep.po: term.h
+lib_beep.po: unctrl.h
+lib_bkgd.So: curses.h
+lib_bkgd.So: ncurses_def.h
+lib_bkgd.So: term.h
+lib_bkgd.So: unctrl.h
+lib_bkgd.o: curses.h
+lib_bkgd.o: ncurses_def.h
+lib_bkgd.o: term.h
+lib_bkgd.o: unctrl.h
+lib_bkgd.po: curses.h
+lib_bkgd.po: ncurses_def.h
+lib_bkgd.po: term.h
+lib_bkgd.po: unctrl.h
+lib_box.So: curses.h
+lib_box.So: ncurses_def.h
+lib_box.So: term.h
+lib_box.So: unctrl.h
+lib_box.o: curses.h
+lib_box.o: ncurses_def.h
+lib_box.o: term.h
+lib_box.o: unctrl.h
+lib_box.po: curses.h
+lib_box.po: ncurses_def.h
+lib_box.po: term.h
+lib_box.po: unctrl.h
+lib_chgat.So: curses.h
+lib_chgat.So: ncurses_def.h
+lib_chgat.So: term.h
+lib_chgat.So: unctrl.h
+lib_chgat.o: curses.h
+lib_chgat.o: ncurses_def.h
+lib_chgat.o: term.h
+lib_chgat.o: unctrl.h
+lib_chgat.po: curses.h
+lib_chgat.po: ncurses_def.h
+lib_chgat.po: term.h
+lib_chgat.po: unctrl.h
+lib_clear.So: curses.h
+lib_clear.So: ncurses_def.h
+lib_clear.So: term.h
+lib_clear.So: unctrl.h
+lib_clear.o: curses.h
+lib_clear.o: ncurses_def.h
+lib_clear.o: term.h
+lib_clear.o: unctrl.h
+lib_clear.po: curses.h
+lib_clear.po: ncurses_def.h
+lib_clear.po: term.h
+lib_clear.po: unctrl.h
+lib_clearok.So: curses.h
+lib_clearok.So: ncurses_def.h
+lib_clearok.So: term.h
+lib_clearok.So: unctrl.h
+lib_clearok.o: curses.h
+lib_clearok.o: ncurses_def.h
+lib_clearok.o: term.h
+lib_clearok.o: unctrl.h
+lib_clearok.po: curses.h
+lib_clearok.po: ncurses_def.h
+lib_clearok.po: term.h
+lib_clearok.po: unctrl.h
+lib_clrbot.So: curses.h
+lib_clrbot.So: ncurses_def.h
+lib_clrbot.So: term.h
+lib_clrbot.So: unctrl.h
+lib_clrbot.o: curses.h
+lib_clrbot.o: ncurses_def.h
+lib_clrbot.o: term.h
+lib_clrbot.o: unctrl.h
+lib_clrbot.po: curses.h
+lib_clrbot.po: ncurses_def.h
+lib_clrbot.po: term.h
+lib_clrbot.po: unctrl.h
+lib_clreol.So: curses.h
+lib_clreol.So: ncurses_def.h
+lib_clreol.So: term.h
+lib_clreol.So: unctrl.h
+lib_clreol.o: curses.h
+lib_clreol.o: ncurses_def.h
+lib_clreol.o: term.h
+lib_clreol.o: unctrl.h
+lib_clreol.po: curses.h
+lib_clreol.po: ncurses_def.h
+lib_clreol.po: term.h
+lib_clreol.po: unctrl.h
+lib_color.So: curses.h
+lib_color.So: ncurses_def.h
+lib_color.So: term.h
+lib_color.So: unctrl.h
+lib_color.o: curses.h
+lib_color.o: ncurses_def.h
+lib_color.o: term.h
+lib_color.o: unctrl.h
+lib_color.po: curses.h
+lib_color.po: ncurses_def.h
+lib_color.po: term.h
+lib_color.po: unctrl.h
+lib_colorset.So: curses.h
+lib_colorset.So: ncurses_def.h
+lib_colorset.So: term.h
+lib_colorset.So: unctrl.h
+lib_colorset.o: curses.h
+lib_colorset.o: ncurses_def.h
+lib_colorset.o: term.h
+lib_colorset.o: unctrl.h
+lib_colorset.po: curses.h
+lib_colorset.po: ncurses_def.h
+lib_colorset.po: term.h
+lib_colorset.po: unctrl.h
+lib_cur_term.So: curses.h
+lib_cur_term.So: ncurses_def.h
+lib_cur_term.So: term.h
+lib_cur_term.So: termcap.h
+lib_cur_term.So: unctrl.h
+lib_cur_term.o: curses.h
+lib_cur_term.o: ncurses_def.h
+lib_cur_term.o: term.h
+lib_cur_term.o: termcap.h
+lib_cur_term.o: unctrl.h
+lib_cur_term.po: curses.h
+lib_cur_term.po: ncurses_def.h
+lib_cur_term.po: term.h
+lib_cur_term.po: termcap.h
+lib_cur_term.po: unctrl.h
+lib_data.So: curses.h
+lib_data.So: ncurses_def.h
+lib_data.So: term.h
+lib_data.So: unctrl.h
+lib_data.o: curses.h
+lib_data.o: ncurses_def.h
+lib_data.o: term.h
+lib_data.o: unctrl.h
+lib_data.po: curses.h
+lib_data.po: ncurses_def.h
+lib_data.po: term.h
+lib_data.po: unctrl.h
+lib_delch.So: curses.h
+lib_delch.So: ncurses_def.h
+lib_delch.So: term.h
+lib_delch.So: unctrl.h
+lib_delch.o: curses.h
+lib_delch.o: ncurses_def.h
+lib_delch.o: term.h
+lib_delch.o: unctrl.h
+lib_delch.po: curses.h
+lib_delch.po: ncurses_def.h
+lib_delch.po: term.h
+lib_delch.po: unctrl.h
+lib_delwin.So: curses.h
+lib_delwin.So: ncurses_def.h
+lib_delwin.So: term.h
+lib_delwin.So: unctrl.h
+lib_delwin.o: curses.h
+lib_delwin.o: ncurses_def.h
+lib_delwin.o: term.h
+lib_delwin.o: unctrl.h
+lib_delwin.po: curses.h
+lib_delwin.po: ncurses_def.h
+lib_delwin.po: term.h
+lib_delwin.po: unctrl.h
+lib_dft_fgbg.So: curses.h
+lib_dft_fgbg.So: ncurses_def.h
+lib_dft_fgbg.So: term.h
+lib_dft_fgbg.So: unctrl.h
+lib_dft_fgbg.o: curses.h
+lib_dft_fgbg.o: ncurses_def.h
+lib_dft_fgbg.o: term.h
+lib_dft_fgbg.o: unctrl.h
+lib_dft_fgbg.po: curses.h
+lib_dft_fgbg.po: ncurses_def.h
+lib_dft_fgbg.po: term.h
+lib_dft_fgbg.po: unctrl.h
+lib_echo.So: curses.h
+lib_echo.So: ncurses_def.h
+lib_echo.So: term.h
+lib_echo.So: unctrl.h
+lib_echo.o: curses.h
+lib_echo.o: ncurses_def.h
+lib_echo.o: term.h
+lib_echo.o: unctrl.h
+lib_echo.po: curses.h
+lib_echo.po: ncurses_def.h
+lib_echo.po: term.h
+lib_echo.po: unctrl.h
+lib_endwin.So: curses.h
+lib_endwin.So: ncurses_def.h
+lib_endwin.So: term.h
+lib_endwin.So: unctrl.h
+lib_endwin.o: curses.h
+lib_endwin.o: ncurses_def.h
+lib_endwin.o: term.h
+lib_endwin.o: unctrl.h
+lib_endwin.po: curses.h
+lib_endwin.po: ncurses_def.h
+lib_endwin.po: term.h
+lib_endwin.po: unctrl.h
+lib_erase.So: curses.h
+lib_erase.So: ncurses_def.h
+lib_erase.So: term.h
+lib_erase.So: unctrl.h
+lib_erase.o: curses.h
+lib_erase.o: ncurses_def.h
+lib_erase.o: term.h
+lib_erase.o: unctrl.h
+lib_erase.po: curses.h
+lib_erase.po: ncurses_def.h
+lib_erase.po: term.h
+lib_erase.po: unctrl.h
+lib_flash.So: curses.h
+lib_flash.So: ncurses_def.h
+lib_flash.So: term.h
+lib_flash.So: unctrl.h
+lib_flash.o: curses.h
+lib_flash.o: ncurses_def.h
+lib_flash.o: term.h
+lib_flash.o: unctrl.h
+lib_flash.po: curses.h
+lib_flash.po: ncurses_def.h
+lib_flash.po: term.h
+lib_flash.po: unctrl.h
+lib_freeall.So: curses.h
+lib_freeall.So: ncurses_def.h
+lib_freeall.So: term.h
+lib_freeall.So: unctrl.h
+lib_freeall.o: curses.h
+lib_freeall.o: ncurses_def.h
+lib_freeall.o: term.h
+lib_freeall.o: unctrl.h
+lib_freeall.po: curses.h
+lib_freeall.po: ncurses_def.h
+lib_freeall.po: term.h
+lib_freeall.po: unctrl.h
+lib_gen.So: curses.h
+lib_gen.So: lib_gen.c
+lib_gen.So: ncurses_def.h
+lib_gen.So: term.h
+lib_gen.So: unctrl.h
+lib_gen.o: curses.h
+lib_gen.o: lib_gen.c
+lib_gen.o: ncurses_def.h
+lib_gen.o: term.h
+lib_gen.o: unctrl.h
+lib_gen.po: curses.h
+lib_gen.po: lib_gen.c
+lib_gen.po: ncurses_def.h
+lib_gen.po: term.h
+lib_gen.po: unctrl.h
+lib_getch.So: curses.h
+lib_getch.So: ncurses_def.h
+lib_getch.So: term.h
+lib_getch.So: unctrl.h
+lib_getch.o: curses.h
+lib_getch.o: ncurses_def.h
+lib_getch.o: term.h
+lib_getch.o: unctrl.h
+lib_getch.po: curses.h
+lib_getch.po: ncurses_def.h
+lib_getch.po: term.h
+lib_getch.po: unctrl.h
+lib_getstr.So: curses.h
+lib_getstr.So: ncurses_def.h
+lib_getstr.So: term.h
+lib_getstr.So: unctrl.h
+lib_getstr.o: curses.h
+lib_getstr.o: ncurses_def.h
+lib_getstr.o: term.h
+lib_getstr.o: unctrl.h
+lib_getstr.po: curses.h
+lib_getstr.po: ncurses_def.h
+lib_getstr.po: term.h
+lib_getstr.po: unctrl.h
+lib_has_cap.So: curses.h
+lib_has_cap.So: ncurses_def.h
+lib_has_cap.So: term.h
+lib_has_cap.So: unctrl.h
+lib_has_cap.o: curses.h
+lib_has_cap.o: ncurses_def.h
+lib_has_cap.o: term.h
+lib_has_cap.o: unctrl.h
+lib_has_cap.po: curses.h
+lib_has_cap.po: ncurses_def.h
+lib_has_cap.po: term.h
+lib_has_cap.po: unctrl.h
+lib_hline.So: curses.h
+lib_hline.So: ncurses_def.h
+lib_hline.So: term.h
+lib_hline.So: unctrl.h
+lib_hline.o: curses.h
+lib_hline.o: ncurses_def.h
+lib_hline.o: term.h
+lib_hline.o: unctrl.h
+lib_hline.po: curses.h
+lib_hline.po: ncurses_def.h
+lib_hline.po: term.h
+lib_hline.po: unctrl.h
+lib_immedok.So: curses.h
+lib_immedok.So: ncurses_def.h
+lib_immedok.So: term.h
+lib_immedok.So: unctrl.h
+lib_immedok.o: curses.h
+lib_immedok.o: ncurses_def.h
+lib_immedok.o: term.h
+lib_immedok.o: unctrl.h
+lib_immedok.po: curses.h
+lib_immedok.po: ncurses_def.h
+lib_immedok.po: term.h
+lib_immedok.po: unctrl.h
+lib_inchstr.So: curses.h
+lib_inchstr.So: ncurses_def.h
+lib_inchstr.So: term.h
+lib_inchstr.So: unctrl.h
+lib_inchstr.o: curses.h
+lib_inchstr.o: ncurses_def.h
+lib_inchstr.o: term.h
+lib_inchstr.o: unctrl.h
+lib_inchstr.po: curses.h
+lib_inchstr.po: ncurses_def.h
+lib_inchstr.po: term.h
+lib_inchstr.po: unctrl.h
+lib_initscr.So: curses.h
+lib_initscr.So: ncurses_def.h
+lib_initscr.So: term.h
+lib_initscr.So: unctrl.h
+lib_initscr.o: curses.h
+lib_initscr.o: ncurses_def.h
+lib_initscr.o: term.h
+lib_initscr.o: unctrl.h
+lib_initscr.po: curses.h
+lib_initscr.po: ncurses_def.h
+lib_initscr.po: term.h
+lib_initscr.po: unctrl.h
+lib_insch.So: curses.h
+lib_insch.So: ncurses_def.h
+lib_insch.So: term.h
+lib_insch.So: unctrl.h
+lib_insch.o: curses.h
+lib_insch.o: ncurses_def.h
+lib_insch.o: term.h
+lib_insch.o: unctrl.h
+lib_insch.po: curses.h
+lib_insch.po: ncurses_def.h
+lib_insch.po: term.h
+lib_insch.po: unctrl.h
+lib_insdel.So: curses.h
+lib_insdel.So: ncurses_def.h
+lib_insdel.So: term.h
+lib_insdel.So: unctrl.h
+lib_insdel.o: curses.h
+lib_insdel.o: ncurses_def.h
+lib_insdel.o: term.h
+lib_insdel.o: unctrl.h
+lib_insdel.po: curses.h
+lib_insdel.po: ncurses_def.h
+lib_insdel.po: term.h
+lib_insdel.po: unctrl.h
+lib_insnstr.So: curses.h
+lib_insnstr.So: ncurses_def.h
+lib_insnstr.So: term.h
+lib_insnstr.So: unctrl.h
+lib_insnstr.o: curses.h
+lib_insnstr.o: ncurses_def.h
+lib_insnstr.o: term.h
+lib_insnstr.o: unctrl.h
+lib_insnstr.po: curses.h
+lib_insnstr.po: ncurses_def.h
+lib_insnstr.po: term.h
+lib_insnstr.po: unctrl.h
+lib_instr.So: curses.h
+lib_instr.So: ncurses_def.h
+lib_instr.So: term.h
+lib_instr.So: unctrl.h
+lib_instr.o: curses.h
+lib_instr.o: ncurses_def.h
+lib_instr.o: term.h
+lib_instr.o: unctrl.h
+lib_instr.po: curses.h
+lib_instr.po: ncurses_def.h
+lib_instr.po: term.h
+lib_instr.po: unctrl.h
+lib_isendwin.So: curses.h
+lib_isendwin.So: ncurses_def.h
+lib_isendwin.So: term.h
+lib_isendwin.So: unctrl.h
+lib_isendwin.o: curses.h
+lib_isendwin.o: ncurses_def.h
+lib_isendwin.o: term.h
+lib_isendwin.o: unctrl.h
+lib_isendwin.po: curses.h
+lib_isendwin.po: ncurses_def.h
+lib_isendwin.po: term.h
+lib_isendwin.po: unctrl.h
+lib_kernel.So: curses.h
+lib_kernel.So: ncurses_def.h
+lib_kernel.So: term.h
+lib_kernel.So: unctrl.h
+lib_kernel.o: curses.h
+lib_kernel.o: ncurses_def.h
+lib_kernel.o: term.h
+lib_kernel.o: unctrl.h
+lib_kernel.po: curses.h
+lib_kernel.po: ncurses_def.h
+lib_kernel.po: term.h
+lib_kernel.po: unctrl.h
+lib_keyname.So: curses.h
+lib_keyname.So: lib_keyname.c
+lib_keyname.So: ncurses_def.h
+lib_keyname.So: term.h
+lib_keyname.So: unctrl.h
+lib_keyname.o: curses.h
+lib_keyname.o: lib_keyname.c
+lib_keyname.o: ncurses_def.h
+lib_keyname.o: term.h
+lib_keyname.o: unctrl.h
+lib_keyname.po: curses.h
+lib_keyname.po: lib_keyname.c
+lib_keyname.po: ncurses_def.h
+lib_keyname.po: term.h
+lib_keyname.po: unctrl.h
+lib_leaveok.So: curses.h
+lib_leaveok.So: ncurses_def.h
+lib_leaveok.So: term.h
+lib_leaveok.So: unctrl.h
+lib_leaveok.o: curses.h
+lib_leaveok.o: ncurses_def.h
+lib_leaveok.o: term.h
+lib_leaveok.o: unctrl.h
+lib_leaveok.po: curses.h
+lib_leaveok.po: ncurses_def.h
+lib_leaveok.po: term.h
+lib_leaveok.po: unctrl.h
+lib_longname.So: curses.h
+lib_longname.So: ncurses_def.h
+lib_longname.So: term.h
+lib_longname.So: unctrl.h
+lib_longname.o: curses.h
+lib_longname.o: ncurses_def.h
+lib_longname.o: term.h
+lib_longname.o: unctrl.h
+lib_longname.po: curses.h
+lib_longname.po: ncurses_def.h
+lib_longname.po: term.h
+lib_longname.po: unctrl.h
+lib_mouse.So: curses.h
+lib_mouse.So: ncurses_def.h
+lib_mouse.So: term.h
+lib_mouse.So: unctrl.h
+lib_mouse.o: curses.h
+lib_mouse.o: ncurses_def.h
+lib_mouse.o: term.h
+lib_mouse.o: unctrl.h
+lib_mouse.po: curses.h
+lib_mouse.po: ncurses_def.h
+lib_mouse.po: term.h
+lib_mouse.po: unctrl.h
+lib_move.So: curses.h
+lib_move.So: ncurses_def.h
+lib_move.So: term.h
+lib_move.So: unctrl.h
+lib_move.o: curses.h
+lib_move.o: ncurses_def.h
+lib_move.o: term.h
+lib_move.o: unctrl.h
+lib_move.po: curses.h
+lib_move.po: ncurses_def.h
+lib_move.po: term.h
+lib_move.po: unctrl.h
+lib_mvcur.So: curses.h
+lib_mvcur.So: ncurses_def.h
+lib_mvcur.So: term.h
+lib_mvcur.So: unctrl.h
+lib_mvcur.o: curses.h
+lib_mvcur.o: ncurses_def.h
+lib_mvcur.o: term.h
+lib_mvcur.o: unctrl.h
+lib_mvcur.po: curses.h
+lib_mvcur.po: ncurses_def.h
+lib_mvcur.po: term.h
+lib_mvcur.po: unctrl.h
+lib_mvwin.So: curses.h
+lib_mvwin.So: ncurses_def.h
+lib_mvwin.So: term.h
+lib_mvwin.So: unctrl.h
+lib_mvwin.o: curses.h
+lib_mvwin.o: ncurses_def.h
+lib_mvwin.o: term.h
+lib_mvwin.o: unctrl.h
+lib_mvwin.po: curses.h
+lib_mvwin.po: ncurses_def.h
+lib_mvwin.po: term.h
+lib_mvwin.po: unctrl.h
+lib_napms.So: curses.h
+lib_napms.So: ncurses_def.h
+lib_napms.So: term.h
+lib_napms.So: unctrl.h
+lib_napms.o: curses.h
+lib_napms.o: ncurses_def.h
+lib_napms.o: term.h
+lib_napms.o: unctrl.h
+lib_napms.po: curses.h
+lib_napms.po: ncurses_def.h
+lib_napms.po: term.h
+lib_napms.po: unctrl.h
+lib_newterm.So: curses.h
+lib_newterm.So: ncurses_def.h
+lib_newterm.So: term.h
+lib_newterm.So: unctrl.h
+lib_newterm.o: curses.h
+lib_newterm.o: ncurses_def.h
+lib_newterm.o: term.h
+lib_newterm.o: unctrl.h
+lib_newterm.po: curses.h
+lib_newterm.po: ncurses_def.h
+lib_newterm.po: term.h
+lib_newterm.po: unctrl.h
+lib_newwin.So: curses.h
+lib_newwin.So: ncurses_def.h
+lib_newwin.So: term.h
+lib_newwin.So: unctrl.h
+lib_newwin.o: curses.h
+lib_newwin.o: ncurses_def.h
+lib_newwin.o: term.h
+lib_newwin.o: unctrl.h
+lib_newwin.po: curses.h
+lib_newwin.po: ncurses_def.h
+lib_newwin.po: term.h
+lib_newwin.po: unctrl.h
+lib_nl.So: curses.h
+lib_nl.So: ncurses_def.h
+lib_nl.So: term.h
+lib_nl.So: unctrl.h
+lib_nl.o: curses.h
+lib_nl.o: ncurses_def.h
+lib_nl.o: term.h
+lib_nl.o: unctrl.h
+lib_nl.po: curses.h
+lib_nl.po: ncurses_def.h
+lib_nl.po: term.h
+lib_nl.po: unctrl.h
+lib_options.So: curses.h
+lib_options.So: ncurses_def.h
+lib_options.So: term.h
+lib_options.So: unctrl.h
+lib_options.o: curses.h
+lib_options.o: ncurses_def.h
+lib_options.o: term.h
+lib_options.o: unctrl.h
+lib_options.po: curses.h
+lib_options.po: ncurses_def.h
+lib_options.po: term.h
+lib_options.po: unctrl.h
+lib_overlay.So: curses.h
+lib_overlay.So: ncurses_def.h
+lib_overlay.So: term.h
+lib_overlay.So: unctrl.h
+lib_overlay.o: curses.h
+lib_overlay.o: ncurses_def.h
+lib_overlay.o: term.h
+lib_overlay.o: unctrl.h
+lib_overlay.po: curses.h
+lib_overlay.po: ncurses_def.h
+lib_overlay.po: term.h
+lib_overlay.po: unctrl.h
+lib_pad.So: curses.h
+lib_pad.So: ncurses_def.h
+lib_pad.So: term.h
+lib_pad.So: unctrl.h
+lib_pad.o: curses.h
+lib_pad.o: ncurses_def.h
+lib_pad.o: term.h
+lib_pad.o: unctrl.h
+lib_pad.po: curses.h
+lib_pad.po: ncurses_def.h
+lib_pad.po: term.h
+lib_pad.po: unctrl.h
+lib_print.So: curses.h
+lib_print.So: ncurses_def.h
+lib_print.So: term.h
+lib_print.So: unctrl.h
+lib_print.o: curses.h
+lib_print.o: ncurses_def.h
+lib_print.o: term.h
+lib_print.o: unctrl.h
+lib_print.po: curses.h
+lib_print.po: ncurses_def.h
+lib_print.po: term.h
+lib_print.po: unctrl.h
+lib_printw.So: curses.h
+lib_printw.So: ncurses_def.h
+lib_printw.So: term.h
+lib_printw.So: unctrl.h
+lib_printw.o: curses.h
+lib_printw.o: ncurses_def.h
+lib_printw.o: term.h
+lib_printw.o: unctrl.h
+lib_printw.po: curses.h
+lib_printw.po: ncurses_def.h
+lib_printw.po: term.h
+lib_printw.po: unctrl.h
+lib_raw.So: curses.h
+lib_raw.So: ncurses_def.h
+lib_raw.So: term.h
+lib_raw.So: unctrl.h
+lib_raw.o: curses.h
+lib_raw.o: ncurses_def.h
+lib_raw.o: term.h
+lib_raw.o: unctrl.h
+lib_raw.po: curses.h
+lib_raw.po: ncurses_def.h
+lib_raw.po: term.h
+lib_raw.po: unctrl.h
+lib_redrawln.So: curses.h
+lib_redrawln.So: ncurses_def.h
+lib_redrawln.So: term.h
+lib_redrawln.So: unctrl.h
+lib_redrawln.o: curses.h
+lib_redrawln.o: ncurses_def.h
+lib_redrawln.o: term.h
+lib_redrawln.o: unctrl.h
+lib_redrawln.po: curses.h
+lib_redrawln.po: ncurses_def.h
+lib_redrawln.po: term.h
+lib_redrawln.po: unctrl.h
+lib_refresh.So: curses.h
+lib_refresh.So: ncurses_def.h
+lib_refresh.So: term.h
+lib_refresh.So: unctrl.h
+lib_refresh.o: curses.h
+lib_refresh.o: ncurses_def.h
+lib_refresh.o: term.h
+lib_refresh.o: unctrl.h
+lib_refresh.po: curses.h
+lib_refresh.po: ncurses_def.h
+lib_refresh.po: term.h
+lib_refresh.po: unctrl.h
+lib_restart.So: curses.h
+lib_restart.So: ncurses_def.h
+lib_restart.So: term.h
+lib_restart.So: unctrl.h
+lib_restart.o: curses.h
+lib_restart.o: ncurses_def.h
+lib_restart.o: term.h
+lib_restart.o: unctrl.h
+lib_restart.po: curses.h
+lib_restart.po: ncurses_def.h
+lib_restart.po: term.h
+lib_restart.po: unctrl.h
+lib_scanw.So: curses.h
+lib_scanw.So: ncurses_def.h
+lib_scanw.So: term.h
+lib_scanw.So: unctrl.h
+lib_scanw.o: curses.h
+lib_scanw.o: ncurses_def.h
+lib_scanw.o: term.h
+lib_scanw.o: unctrl.h
+lib_scanw.po: curses.h
+lib_scanw.po: ncurses_def.h
+lib_scanw.po: term.h
+lib_scanw.po: unctrl.h
+lib_screen.So: curses.h
+lib_screen.So: ncurses_def.h
+lib_screen.So: term.h
+lib_screen.So: unctrl.h
+lib_screen.o: curses.h
+lib_screen.o: ncurses_def.h
+lib_screen.o: term.h
+lib_screen.o: unctrl.h
+lib_screen.po: curses.h
+lib_screen.po: ncurses_def.h
+lib_screen.po: term.h
+lib_screen.po: unctrl.h
+lib_scroll.So: curses.h
+lib_scroll.So: ncurses_def.h
+lib_scroll.So: term.h
+lib_scroll.So: unctrl.h
+lib_scroll.o: curses.h
+lib_scroll.o: ncurses_def.h
+lib_scroll.o: term.h
+lib_scroll.o: unctrl.h
+lib_scroll.po: curses.h
+lib_scroll.po: ncurses_def.h
+lib_scroll.po: term.h
+lib_scroll.po: unctrl.h
+lib_scrollok.So: curses.h
+lib_scrollok.So: ncurses_def.h
+lib_scrollok.So: term.h
+lib_scrollok.So: unctrl.h
+lib_scrollok.o: curses.h
+lib_scrollok.o: ncurses_def.h
+lib_scrollok.o: term.h
+lib_scrollok.o: unctrl.h
+lib_scrollok.po: curses.h
+lib_scrollok.po: ncurses_def.h
+lib_scrollok.po: term.h
+lib_scrollok.po: unctrl.h
+lib_scrreg.So: curses.h
+lib_scrreg.So: ncurses_def.h
+lib_scrreg.So: term.h
+lib_scrreg.So: unctrl.h
+lib_scrreg.o: curses.h
+lib_scrreg.o: ncurses_def.h
+lib_scrreg.o: term.h
+lib_scrreg.o: unctrl.h
+lib_scrreg.po: curses.h
+lib_scrreg.po: ncurses_def.h
+lib_scrreg.po: term.h
+lib_scrreg.po: unctrl.h
+lib_set_term.So: curses.h
+lib_set_term.So: ncurses_def.h
+lib_set_term.So: term.h
+lib_set_term.So: unctrl.h
+lib_set_term.o: curses.h
+lib_set_term.o: ncurses_def.h
+lib_set_term.o: term.h
+lib_set_term.o: unctrl.h
+lib_set_term.po: curses.h
+lib_set_term.po: ncurses_def.h
+lib_set_term.po: term.h
+lib_set_term.po: unctrl.h
+lib_setup.So: curses.h
+lib_setup.So: ncurses_def.h
+lib_setup.So: term.h
+lib_setup.So: unctrl.h
+lib_setup.o: curses.h
+lib_setup.o: ncurses_def.h
+lib_setup.o: term.h
+lib_setup.o: unctrl.h
+lib_setup.po: curses.h
+lib_setup.po: ncurses_def.h
+lib_setup.po: term.h
+lib_setup.po: unctrl.h
+lib_slk.So: curses.h
+lib_slk.So: ncurses_def.h
+lib_slk.So: term.h
+lib_slk.So: unctrl.h
+lib_slk.o: curses.h
+lib_slk.o: ncurses_def.h
+lib_slk.o: term.h
+lib_slk.o: unctrl.h
+lib_slk.po: curses.h
+lib_slk.po: ncurses_def.h
+lib_slk.po: term.h
+lib_slk.po: unctrl.h
+lib_slkatr_set.So: curses.h
+lib_slkatr_set.So: ncurses_def.h
+lib_slkatr_set.So: term.h
+lib_slkatr_set.So: unctrl.h
+lib_slkatr_set.o: curses.h
+lib_slkatr_set.o: ncurses_def.h
+lib_slkatr_set.o: term.h
+lib_slkatr_set.o: unctrl.h
+lib_slkatr_set.po: curses.h
+lib_slkatr_set.po: ncurses_def.h
+lib_slkatr_set.po: term.h
+lib_slkatr_set.po: unctrl.h
+lib_slkatrof.So: curses.h
+lib_slkatrof.So: ncurses_def.h
+lib_slkatrof.So: term.h
+lib_slkatrof.So: unctrl.h
+lib_slkatrof.o: curses.h
+lib_slkatrof.o: ncurses_def.h
+lib_slkatrof.o: term.h
+lib_slkatrof.o: unctrl.h
+lib_slkatrof.po: curses.h
+lib_slkatrof.po: ncurses_def.h
+lib_slkatrof.po: term.h
+lib_slkatrof.po: unctrl.h
+lib_slkatron.So: curses.h
+lib_slkatron.So: ncurses_def.h
+lib_slkatron.So: term.h
+lib_slkatron.So: unctrl.h
+lib_slkatron.o: curses.h
+lib_slkatron.o: ncurses_def.h
+lib_slkatron.o: term.h
+lib_slkatron.o: unctrl.h
+lib_slkatron.po: curses.h
+lib_slkatron.po: ncurses_def.h
+lib_slkatron.po: term.h
+lib_slkatron.po: unctrl.h
+lib_slkatrset.So: curses.h
+lib_slkatrset.So: ncurses_def.h
+lib_slkatrset.So: term.h
+lib_slkatrset.So: unctrl.h
+lib_slkatrset.o: curses.h
+lib_slkatrset.o: ncurses_def.h
+lib_slkatrset.o: term.h
+lib_slkatrset.o: unctrl.h
+lib_slkatrset.po: curses.h
+lib_slkatrset.po: ncurses_def.h
+lib_slkatrset.po: term.h
+lib_slkatrset.po: unctrl.h
+lib_slkattr.So: curses.h
+lib_slkattr.So: ncurses_def.h
+lib_slkattr.So: term.h
+lib_slkattr.So: unctrl.h
+lib_slkattr.o: curses.h
+lib_slkattr.o: ncurses_def.h
+lib_slkattr.o: term.h
+lib_slkattr.o: unctrl.h
+lib_slkattr.po: curses.h
+lib_slkattr.po: ncurses_def.h
+lib_slkattr.po: term.h
+lib_slkattr.po: unctrl.h
+lib_slkclear.So: curses.h
+lib_slkclear.So: ncurses_def.h
+lib_slkclear.So: term.h
+lib_slkclear.So: unctrl.h
+lib_slkclear.o: curses.h
+lib_slkclear.o: ncurses_def.h
+lib_slkclear.o: term.h
+lib_slkclear.o: unctrl.h
+lib_slkclear.po: curses.h
+lib_slkclear.po: ncurses_def.h
+lib_slkclear.po: term.h
+lib_slkclear.po: unctrl.h
+lib_slkcolor.So: curses.h
+lib_slkcolor.So: ncurses_def.h
+lib_slkcolor.So: term.h
+lib_slkcolor.So: unctrl.h
+lib_slkcolor.o: curses.h
+lib_slkcolor.o: ncurses_def.h
+lib_slkcolor.o: term.h
+lib_slkcolor.o: unctrl.h
+lib_slkcolor.po: curses.h
+lib_slkcolor.po: ncurses_def.h
+lib_slkcolor.po: term.h
+lib_slkcolor.po: unctrl.h
+lib_slkinit.So: curses.h
+lib_slkinit.So: ncurses_def.h
+lib_slkinit.So: term.h
+lib_slkinit.So: unctrl.h
+lib_slkinit.o: curses.h
+lib_slkinit.o: ncurses_def.h
+lib_slkinit.o: term.h
+lib_slkinit.o: unctrl.h
+lib_slkinit.po: curses.h
+lib_slkinit.po: ncurses_def.h
+lib_slkinit.po: term.h
+lib_slkinit.po: unctrl.h
+lib_slklab.So: curses.h
+lib_slklab.So: ncurses_def.h
+lib_slklab.So: term.h
+lib_slklab.So: unctrl.h
+lib_slklab.o: curses.h
+lib_slklab.o: ncurses_def.h
+lib_slklab.o: term.h
+lib_slklab.o: unctrl.h
+lib_slklab.po: curses.h
+lib_slklab.po: ncurses_def.h
+lib_slklab.po: term.h
+lib_slklab.po: unctrl.h
+lib_slkrefr.So: curses.h
+lib_slkrefr.So: ncurses_def.h
+lib_slkrefr.So: term.h
+lib_slkrefr.So: unctrl.h
+lib_slkrefr.o: curses.h
+lib_slkrefr.o: ncurses_def.h
+lib_slkrefr.o: term.h
+lib_slkrefr.o: unctrl.h
+lib_slkrefr.po: curses.h
+lib_slkrefr.po: ncurses_def.h
+lib_slkrefr.po: term.h
+lib_slkrefr.po: unctrl.h
+lib_slkset.So: curses.h
+lib_slkset.So: ncurses_def.h
+lib_slkset.So: term.h
+lib_slkset.So: unctrl.h
+lib_slkset.o: curses.h
+lib_slkset.o: ncurses_def.h
+lib_slkset.o: term.h
+lib_slkset.o: unctrl.h
+lib_slkset.po: curses.h
+lib_slkset.po: ncurses_def.h
+lib_slkset.po: term.h
+lib_slkset.po: unctrl.h
+lib_slktouch.So: curses.h
+lib_slktouch.So: ncurses_def.h
+lib_slktouch.So: term.h
+lib_slktouch.So: unctrl.h
+lib_slktouch.o: curses.h
+lib_slktouch.o: ncurses_def.h
+lib_slktouch.o: term.h
+lib_slktouch.o: unctrl.h
+lib_slktouch.po: curses.h
+lib_slktouch.po: ncurses_def.h
+lib_slktouch.po: term.h
+lib_slktouch.po: unctrl.h
+lib_termcap.So: curses.h
+lib_termcap.So: ncurses_def.h
+lib_termcap.So: term.h
+lib_termcap.So: termcap.h
+lib_termcap.So: unctrl.h
+lib_termcap.o: curses.h
+lib_termcap.o: ncurses_def.h
+lib_termcap.o: term.h
+lib_termcap.o: termcap.h
+lib_termcap.o: unctrl.h
+lib_termcap.po: curses.h
+lib_termcap.po: ncurses_def.h
+lib_termcap.po: term.h
+lib_termcap.po: termcap.h
+lib_termcap.po: unctrl.h
+lib_termname.So: curses.h
+lib_termname.So: ncurses_def.h
+lib_termname.So: term.h
+lib_termname.So: unctrl.h
+lib_termname.o: curses.h
+lib_termname.o: ncurses_def.h
+lib_termname.o: term.h
+lib_termname.o: unctrl.h
+lib_termname.po: curses.h
+lib_termname.po: ncurses_def.h
+lib_termname.po: term.h
+lib_termname.po: unctrl.h
+lib_tgoto.So: curses.h
+lib_tgoto.So: ncurses_def.h
+lib_tgoto.So: term.h
+lib_tgoto.So: termcap.h
+lib_tgoto.So: unctrl.h
+lib_tgoto.o: curses.h
+lib_tgoto.o: ncurses_def.h
+lib_tgoto.o: term.h
+lib_tgoto.o: termcap.h
+lib_tgoto.o: unctrl.h
+lib_tgoto.po: curses.h
+lib_tgoto.po: ncurses_def.h
+lib_tgoto.po: term.h
+lib_tgoto.po: termcap.h
+lib_tgoto.po: unctrl.h
+lib_ti.So: curses.h
+lib_ti.So: ncurses_def.h
+lib_ti.So: term.h
+lib_ti.So: unctrl.h
+lib_ti.o: curses.h
+lib_ti.o: ncurses_def.h
+lib_ti.o: term.h
+lib_ti.o: unctrl.h
+lib_ti.po: curses.h
+lib_ti.po: ncurses_def.h
+lib_ti.po: term.h
+lib_ti.po: unctrl.h
+lib_touch.So: curses.h
+lib_touch.So: ncurses_def.h
+lib_touch.So: term.h
+lib_touch.So: unctrl.h
+lib_touch.o: curses.h
+lib_touch.o: ncurses_def.h
+lib_touch.o: term.h
+lib_touch.o: unctrl.h
+lib_touch.po: curses.h
+lib_touch.po: ncurses_def.h
+lib_touch.po: term.h
+lib_touch.po: unctrl.h
+lib_tparm.So: curses.h
+lib_tparm.So: ncurses_def.h
+lib_tparm.So: term.h
+lib_tparm.So: unctrl.h
+lib_tparm.o: curses.h
+lib_tparm.o: ncurses_def.h
+lib_tparm.o: term.h
+lib_tparm.o: unctrl.h
+lib_tparm.po: curses.h
+lib_tparm.po: ncurses_def.h
+lib_tparm.po: term.h
+lib_tparm.po: unctrl.h
+lib_tputs.So: curses.h
+lib_tputs.So: ncurses_def.h
+lib_tputs.So: term.h
+lib_tputs.So: termcap.h
+lib_tputs.So: unctrl.h
+lib_tputs.o: curses.h
+lib_tputs.o: ncurses_def.h
+lib_tputs.o: term.h
+lib_tputs.o: termcap.h
+lib_tputs.o: unctrl.h
+lib_tputs.po: curses.h
+lib_tputs.po: ncurses_def.h
+lib_tputs.po: term.h
+lib_tputs.po: termcap.h
+lib_tputs.po: unctrl.h
+lib_trace.So: curses.h
+lib_trace.So: ncurses_def.h
+lib_trace.So: term.h
+lib_trace.So: unctrl.h
+lib_trace.o: curses.h
+lib_trace.o: ncurses_def.h
+lib_trace.o: term.h
+lib_trace.o: unctrl.h
+lib_trace.po: curses.h
+lib_trace.po: ncurses_def.h
+lib_trace.po: term.h
+lib_trace.po: unctrl.h
+lib_tstp.So: curses.h
+lib_tstp.So: ncurses_def.h
+lib_tstp.So: term.h
+lib_tstp.So: unctrl.h
+lib_tstp.o: curses.h
+lib_tstp.o: ncurses_def.h
+lib_tstp.o: term.h
+lib_tstp.o: unctrl.h
+lib_tstp.po: curses.h
+lib_tstp.po: ncurses_def.h
+lib_tstp.po: term.h
+lib_tstp.po: unctrl.h
+lib_ttyflags.So: curses.h
+lib_ttyflags.So: ncurses_def.h
+lib_ttyflags.So: term.h
+lib_ttyflags.So: unctrl.h
+lib_ttyflags.o: curses.h
+lib_ttyflags.o: ncurses_def.h
+lib_ttyflags.o: term.h
+lib_ttyflags.o: unctrl.h
+lib_ttyflags.po: curses.h
+lib_ttyflags.po: ncurses_def.h
+lib_ttyflags.po: term.h
+lib_ttyflags.po: unctrl.h
+lib_twait.So: curses.h
+lib_twait.So: ncurses_def.h
+lib_twait.So: term.h
+lib_twait.So: unctrl.h
+lib_twait.o: curses.h
+lib_twait.o: ncurses_def.h
+lib_twait.o: term.h
+lib_twait.o: unctrl.h
+lib_twait.po: curses.h
+lib_twait.po: ncurses_def.h
+lib_twait.po: term.h
+lib_twait.po: unctrl.h
+lib_ungetch.So: curses.h
+lib_ungetch.So: ncurses_def.h
+lib_ungetch.So: term.h
+lib_ungetch.So: unctrl.h
+lib_ungetch.o: curses.h
+lib_ungetch.o: ncurses_def.h
+lib_ungetch.o: term.h
+lib_ungetch.o: unctrl.h
+lib_ungetch.po: curses.h
+lib_ungetch.po: ncurses_def.h
+lib_ungetch.po: term.h
+lib_ungetch.po: unctrl.h
+lib_vidattr.So: curses.h
+lib_vidattr.So: ncurses_def.h
+lib_vidattr.So: term.h
+lib_vidattr.So: unctrl.h
+lib_vidattr.o: curses.h
+lib_vidattr.o: ncurses_def.h
+lib_vidattr.o: term.h
+lib_vidattr.o: unctrl.h
+lib_vidattr.po: curses.h
+lib_vidattr.po: ncurses_def.h
+lib_vidattr.po: term.h
+lib_vidattr.po: unctrl.h
+lib_vline.So: curses.h
+lib_vline.So: ncurses_def.h
+lib_vline.So: term.h
+lib_vline.So: unctrl.h
+lib_vline.o: curses.h
+lib_vline.o: ncurses_def.h
+lib_vline.o: term.h
+lib_vline.o: unctrl.h
+lib_vline.po: curses.h
+lib_vline.po: ncurses_def.h
+lib_vline.po: term.h
+lib_vline.po: unctrl.h
+lib_wattroff.So: curses.h
+lib_wattroff.So: ncurses_def.h
+lib_wattroff.So: term.h
+lib_wattroff.So: unctrl.h
+lib_wattroff.o: curses.h
+lib_wattroff.o: ncurses_def.h
+lib_wattroff.o: term.h
+lib_wattroff.o: unctrl.h
+lib_wattroff.po: curses.h
+lib_wattroff.po: ncurses_def.h
+lib_wattroff.po: term.h
+lib_wattroff.po: unctrl.h
+lib_wattron.So: curses.h
+lib_wattron.So: ncurses_def.h
+lib_wattron.So: term.h
+lib_wattron.So: unctrl.h
+lib_wattron.o: curses.h
+lib_wattron.o: ncurses_def.h
+lib_wattron.o: term.h
+lib_wattron.o: unctrl.h
+lib_wattron.po: curses.h
+lib_wattron.po: ncurses_def.h
+lib_wattron.po: term.h
+lib_wattron.po: unctrl.h
+lib_winch.So: curses.h
+lib_winch.So: ncurses_def.h
+lib_winch.So: term.h
+lib_winch.So: unctrl.h
+lib_winch.o: curses.h
+lib_winch.o: ncurses_def.h
+lib_winch.o: term.h
+lib_winch.o: unctrl.h
+lib_winch.po: curses.h
+lib_winch.po: ncurses_def.h
+lib_winch.po: term.h
+lib_winch.po: unctrl.h
+lib_window.So: curses.h
+lib_window.So: ncurses_def.h
+lib_window.So: term.h
+lib_window.So: unctrl.h
+lib_window.o: curses.h
+lib_window.o: ncurses_def.h
+lib_window.o: term.h
+lib_window.o: unctrl.h
+lib_window.po: curses.h
+lib_window.po: ncurses_def.h
+lib_window.po: term.h
+lib_window.po: unctrl.h
+memmove.So: curses.h
+memmove.So: ncurses_def.h
+memmove.So: term.h
+memmove.So: unctrl.h
+memmove.o: curses.h
+memmove.o: ncurses_def.h
+memmove.o: term.h
+memmove.o: unctrl.h
+memmove.po: curses.h
+memmove.po: ncurses_def.h
+memmove.po: term.h
+memmove.po: unctrl.h
+name_match.So: curses.h
+name_match.So: ncurses_def.h
+name_match.So: term.h
+name_match.So: unctrl.h
+name_match.o: curses.h
+name_match.o: ncurses_def.h
+name_match.o: term.h
+name_match.o: unctrl.h
+name_match.po: curses.h
+name_match.po: ncurses_def.h
+name_match.po: term.h
+name_match.po: unctrl.h
+names.So: curses.h
+names.So: names.c
+names.So: ncurses_def.h
+names.So: term.h
+names.So: unctrl.h
+names.o: curses.h
+names.o: names.c
+names.o: ncurses_def.h
+names.o: term.h
+names.o: unctrl.h
+names.po: curses.h
+names.po: names.c
+names.po: ncurses_def.h
+names.po: term.h
+names.po: unctrl.h
+nc_panel.So: curses.h
+nc_panel.So: ncurses_def.h
+nc_panel.So: term.h
+nc_panel.So: unctrl.h
+nc_panel.o: curses.h
+nc_panel.o: ncurses_def.h
+nc_panel.o: term.h
+nc_panel.o: unctrl.h
+nc_panel.po: curses.h
+nc_panel.po: ncurses_def.h
+nc_panel.po: term.h
+nc_panel.po: unctrl.h
+parse_entry.So: curses.h
+parse_entry.So: ncurses_def.h
+parse_entry.So: parametrized.h
+parse_entry.So: term.h
+parse_entry.So: unctrl.h
+parse_entry.o: curses.h
+parse_entry.o: ncurses_def.h
+parse_entry.o: parametrized.h
+parse_entry.o: term.h
+parse_entry.o: unctrl.h
+parse_entry.po: curses.h
+parse_entry.po: ncurses_def.h
+parse_entry.po: parametrized.h
+parse_entry.po: term.h
+parse_entry.po: unctrl.h
+read_entry.So: curses.h
+read_entry.So: ncurses_def.h
+read_entry.So: term.h
+read_entry.So: unctrl.h
+read_entry.o: curses.h
+read_entry.o: ncurses_def.h
+read_entry.o: term.h
+read_entry.o: unctrl.h
+read_entry.po: curses.h
+read_entry.po: ncurses_def.h
+read_entry.po: term.h
+read_entry.po: unctrl.h
+resizeterm.So: curses.h
+resizeterm.So: ncurses_def.h
+resizeterm.So: term.h
+resizeterm.So: unctrl.h
+resizeterm.o: curses.h
+resizeterm.o: ncurses_def.h
+resizeterm.o: term.h
+resizeterm.o: unctrl.h
+resizeterm.po: curses.h
+resizeterm.po: ncurses_def.h
+resizeterm.po: term.h
+resizeterm.po: unctrl.h
+safe_sprintf.So: curses.h
+safe_sprintf.So: ncurses_def.h
+safe_sprintf.So: term.h
+safe_sprintf.So: unctrl.h
+safe_sprintf.o: curses.h
+safe_sprintf.o: ncurses_def.h
+safe_sprintf.o: term.h
+safe_sprintf.o: unctrl.h
+safe_sprintf.po: curses.h
+safe_sprintf.po: ncurses_def.h
+safe_sprintf.po: term.h
+safe_sprintf.po: unctrl.h
+setbuf.So: curses.h
+setbuf.So: ncurses_def.h
+setbuf.So: term.h
+setbuf.So: unctrl.h
+setbuf.o: curses.h
+setbuf.o: ncurses_def.h
+setbuf.o: term.h
+setbuf.o: unctrl.h
+setbuf.po: curses.h
+setbuf.po: ncurses_def.h
+setbuf.po: term.h
+setbuf.po: unctrl.h
+strings.So: curses.h
+strings.So: ncurses_def.h
+strings.So: term.h
+strings.So: unctrl.h
+strings.o: curses.h
+strings.o: ncurses_def.h
+strings.o: term.h
+strings.o: unctrl.h
+strings.po: curses.h
+strings.po: ncurses_def.h
+strings.po: term.h
+strings.po: unctrl.h
+termcap.So: curses.h
+termcap.So: ncurses_def.h
+termcap.So: term.h
+termcap.So: unctrl.h
+termcap.o: curses.h
+termcap.o: ncurses_def.h
+termcap.o: term.h
+termcap.o: unctrl.h
+termcap.po: curses.h
+termcap.po: ncurses_def.h
+termcap.po: term.h
+termcap.po: unctrl.h
+tries.So: curses.h
+tries.So: ncurses_def.h
+tries.So: term.h
+tries.So: unctrl.h
+tries.o: curses.h
+tries.o: ncurses_def.h
+tries.o: term.h
+tries.o: unctrl.h
+tries.po: curses.h
+tries.po: ncurses_def.h
+tries.po: term.h
+tries.po: unctrl.h
+trim_sgr0.So: curses.h
+trim_sgr0.So: ncurses_def.h
+trim_sgr0.So: term.h
+trim_sgr0.So: unctrl.h
+trim_sgr0.o: curses.h
+trim_sgr0.o: ncurses_def.h
+trim_sgr0.o: term.h
+trim_sgr0.o: unctrl.h
+trim_sgr0.po: curses.h
+trim_sgr0.po: ncurses_def.h
+trim_sgr0.po: term.h
+trim_sgr0.po: unctrl.h
+tty_update.So: curses.h
+tty_update.So: ncurses_def.h
+tty_update.So: term.h
+tty_update.So: unctrl.h
+tty_update.o: curses.h
+tty_update.o: ncurses_def.h
+tty_update.o: term.h
+tty_update.o: unctrl.h
+tty_update.po: curses.h
+tty_update.po: ncurses_def.h
+tty_update.po: term.h
+tty_update.po: unctrl.h
+unctrl.So: curses.h
+unctrl.So: ncurses_def.h
+unctrl.So: term.h
+unctrl.So: unctrl.c
+unctrl.So: unctrl.h
+unctrl.o: curses.h
+unctrl.o: ncurses_def.h
+unctrl.o: term.h
+unctrl.o: unctrl.c
+unctrl.o: unctrl.h
+unctrl.po: curses.h
+unctrl.po: ncurses_def.h
+unctrl.po: term.h
+unctrl.po: unctrl.c
+unctrl.po: unctrl.h
+version.So: curses.h
+version.So: ncurses_def.h
+version.So: term.h
+version.So: unctrl.h
+version.o: curses.h
+version.o: ncurses_def.h
+version.o: term.h
+version.o: unctrl.h
+version.po: curses.h
+version.po: ncurses_def.h
+version.po: term.h
+version.po: unctrl.h
+visbuf.So: curses.h
+visbuf.So: ncurses_def.h
+visbuf.So: term.h
+visbuf.So: unctrl.h
+visbuf.o: curses.h
+visbuf.o: ncurses_def.h
+visbuf.o: term.h
+visbuf.o: unctrl.h
+visbuf.po: curses.h
+visbuf.po: ncurses_def.h
+visbuf.po: term.h
+visbuf.po: unctrl.h
+vsscanf.So: curses.h
+vsscanf.So: ncurses_def.h
+vsscanf.So: term.h
+vsscanf.So: unctrl.h
+vsscanf.o: curses.h
+vsscanf.o: ncurses_def.h
+vsscanf.o: term.h
+vsscanf.o: unctrl.h
+vsscanf.po: curses.h
+vsscanf.po: ncurses_def.h
+vsscanf.po: term.h
+vsscanf.po: unctrl.h
+wresize.So: curses.h
+wresize.So: ncurses_def.h
+wresize.So: term.h
+wresize.So: unctrl.h
+wresize.o: curses.h
+wresize.o: ncurses_def.h
+wresize.o: term.h
+wresize.o: unctrl.h
+wresize.po: curses.h
+wresize.po: ncurses_def.h
+wresize.po: term.h
+wresize.po: unctrl.h
+write_entry.So: curses.h
+write_entry.So: ncurses_def.h
+write_entry.So: term.h
+write_entry.So: unctrl.h
+write_entry.o: curses.h
+write_entry.o: ncurses_def.h
+write_entry.o: term.h
+write_entry.o: unctrl.h
+write_entry.po: curses.h
+write_entry.po: ncurses_def.h
+write_entry.po: term.h
+write_entry.po: unctrl.h
+.endif
diff --git a/lib/ncurses/ncursesw/Makefile.depend b/lib/ncurses/ncursesw/Makefile.depend
new file mode 100644
index 0000000..55371bd
--- /dev/null
+++ b/lib/ncurses/ncursesw/Makefile.depend
@@ -0,0 +1,2047 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+access.So: curses.h
+access.So: ncurses_def.h
+access.So: term.h
+access.So: unctrl.h
+access.o: curses.h
+access.o: ncurses_def.h
+access.o: term.h
+access.o: unctrl.h
+access.po: curses.h
+access.po: ncurses_def.h
+access.po: term.h
+access.po: unctrl.h
+add_tries.So: curses.h
+add_tries.So: ncurses_def.h
+add_tries.So: term.h
+add_tries.So: unctrl.h
+add_tries.o: curses.h
+add_tries.o: ncurses_def.h
+add_tries.o: term.h
+add_tries.o: unctrl.h
+add_tries.po: curses.h
+add_tries.po: ncurses_def.h
+add_tries.po: term.h
+add_tries.po: unctrl.h
+alloc_entry.So: curses.h
+alloc_entry.So: ncurses_def.h
+alloc_entry.So: term.h
+alloc_entry.So: unctrl.h
+alloc_entry.o: curses.h
+alloc_entry.o: ncurses_def.h
+alloc_entry.o: term.h
+alloc_entry.o: unctrl.h
+alloc_entry.po: curses.h
+alloc_entry.po: ncurses_def.h
+alloc_entry.po: term.h
+alloc_entry.po: unctrl.h
+alloc_ttype.So: curses.h
+alloc_ttype.So: ncurses_def.h
+alloc_ttype.So: term.h
+alloc_ttype.So: unctrl.h
+alloc_ttype.o: curses.h
+alloc_ttype.o: ncurses_def.h
+alloc_ttype.o: term.h
+alloc_ttype.o: unctrl.h
+alloc_ttype.po: curses.h
+alloc_ttype.po: ncurses_def.h
+alloc_ttype.po: term.h
+alloc_ttype.po: unctrl.h
+captoinfo.So: curses.h
+captoinfo.So: ncurses_def.h
+captoinfo.So: term.h
+captoinfo.So: unctrl.h
+captoinfo.o: curses.h
+captoinfo.o: ncurses_def.h
+captoinfo.o: term.h
+captoinfo.o: unctrl.h
+captoinfo.po: curses.h
+captoinfo.po: ncurses_def.h
+captoinfo.po: term.h
+captoinfo.po: unctrl.h
+charable.So: curses.h
+charable.So: ncurses_def.h
+charable.So: term.h
+charable.So: unctrl.h
+charable.o: curses.h
+charable.o: ncurses_def.h
+charable.o: term.h
+charable.o: unctrl.h
+charable.po: curses.h
+charable.po: ncurses_def.h
+charable.po: term.h
+charable.po: unctrl.h
+codes.So: codes.c
+codes.So: curses.h
+codes.So: ncurses_def.h
+codes.So: term.h
+codes.So: unctrl.h
+codes.o: codes.c
+codes.o: curses.h
+codes.o: ncurses_def.h
+codes.o: term.h
+codes.o: unctrl.h
+codes.po: codes.c
+codes.po: curses.h
+codes.po: ncurses_def.h
+codes.po: term.h
+codes.po: unctrl.h
+comp_captab.So: comp_captab.c
+comp_captab.So: curses.h
+comp_captab.So: hashsize.h
+comp_captab.So: ncurses_def.h
+comp_captab.So: term.h
+comp_captab.So: unctrl.h
+comp_captab.o: comp_captab.c
+comp_captab.o: curses.h
+comp_captab.o: hashsize.h
+comp_captab.o: ncurses_def.h
+comp_captab.o: term.h
+comp_captab.o: unctrl.h
+comp_captab.po: comp_captab.c
+comp_captab.po: curses.h
+comp_captab.po: hashsize.h
+comp_captab.po: ncurses_def.h
+comp_captab.po: term.h
+comp_captab.po: unctrl.h
+comp_error.So: curses.h
+comp_error.So: ncurses_def.h
+comp_error.So: term.h
+comp_error.So: unctrl.h
+comp_error.o: curses.h
+comp_error.o: ncurses_def.h
+comp_error.o: term.h
+comp_error.o: unctrl.h
+comp_error.po: curses.h
+comp_error.po: ncurses_def.h
+comp_error.po: term.h
+comp_error.po: unctrl.h
+comp_expand.So: curses.h
+comp_expand.So: ncurses_def.h
+comp_expand.So: term.h
+comp_expand.So: unctrl.h
+comp_expand.o: curses.h
+comp_expand.o: ncurses_def.h
+comp_expand.o: term.h
+comp_expand.o: unctrl.h
+comp_expand.po: curses.h
+comp_expand.po: ncurses_def.h
+comp_expand.po: term.h
+comp_expand.po: unctrl.h
+comp_hash.So: curses.h
+comp_hash.So: hashsize.h
+comp_hash.So: ncurses_def.h
+comp_hash.So: term.h
+comp_hash.So: unctrl.h
+comp_hash.o: curses.h
+comp_hash.o: hashsize.h
+comp_hash.o: ncurses_def.h
+comp_hash.o: term.h
+comp_hash.o: unctrl.h
+comp_hash.po: curses.h
+comp_hash.po: hashsize.h
+comp_hash.po: ncurses_def.h
+comp_hash.po: term.h
+comp_hash.po: unctrl.h
+comp_parse.So: curses.h
+comp_parse.So: ncurses_def.h
+comp_parse.So: term.h
+comp_parse.So: unctrl.h
+comp_parse.o: curses.h
+comp_parse.o: ncurses_def.h
+comp_parse.o: term.h
+comp_parse.o: unctrl.h
+comp_parse.po: curses.h
+comp_parse.po: ncurses_def.h
+comp_parse.po: term.h
+comp_parse.po: unctrl.h
+comp_scan.So: curses.h
+comp_scan.So: ncurses_def.h
+comp_scan.So: term.h
+comp_scan.So: unctrl.h
+comp_scan.o: curses.h
+comp_scan.o: ncurses_def.h
+comp_scan.o: term.h
+comp_scan.o: unctrl.h
+comp_scan.po: curses.h
+comp_scan.po: ncurses_def.h
+comp_scan.po: term.h
+comp_scan.po: unctrl.h
+db_iterator.So: curses.h
+db_iterator.So: ncurses_def.h
+db_iterator.So: term.h
+db_iterator.So: unctrl.h
+db_iterator.o: curses.h
+db_iterator.o: ncurses_def.h
+db_iterator.o: term.h
+db_iterator.o: unctrl.h
+db_iterator.po: curses.h
+db_iterator.po: ncurses_def.h
+db_iterator.po: term.h
+db_iterator.po: unctrl.h
+define_key.So: curses.h
+define_key.So: ncurses_def.h
+define_key.So: term.h
+define_key.So: unctrl.h
+define_key.o: curses.h
+define_key.o: ncurses_def.h
+define_key.o: term.h
+define_key.o: unctrl.h
+define_key.po: curses.h
+define_key.po: ncurses_def.h
+define_key.po: term.h
+define_key.po: unctrl.h
+doalloc.So: curses.h
+doalloc.So: ncurses_def.h
+doalloc.So: term.h
+doalloc.So: unctrl.h
+doalloc.o: curses.h
+doalloc.o: ncurses_def.h
+doalloc.o: term.h
+doalloc.o: unctrl.h
+doalloc.po: curses.h
+doalloc.po: ncurses_def.h
+doalloc.po: term.h
+doalloc.po: unctrl.h
+entries.So: curses.h
+entries.So: ncurses_def.h
+entries.So: term.h
+entries.So: unctrl.h
+entries.o: curses.h
+entries.o: ncurses_def.h
+entries.o: term.h
+entries.o: unctrl.h
+entries.po: curses.h
+entries.po: ncurses_def.h
+entries.po: term.h
+entries.po: unctrl.h
+expanded.So: curses.h
+expanded.So: expanded.c
+expanded.So: ncurses_def.h
+expanded.So: term.h
+expanded.So: unctrl.h
+expanded.o: curses.h
+expanded.o: expanded.c
+expanded.o: ncurses_def.h
+expanded.o: term.h
+expanded.o: unctrl.h
+expanded.po: curses.h
+expanded.po: expanded.c
+expanded.po: ncurses_def.h
+expanded.po: term.h
+expanded.po: unctrl.h
+fallback.So: curses.h
+fallback.So: fallback.c
+fallback.So: ncurses_def.h
+fallback.So: term.h
+fallback.So: unctrl.h
+fallback.o: curses.h
+fallback.o: fallback.c
+fallback.o: ncurses_def.h
+fallback.o: term.h
+fallback.o: unctrl.h
+fallback.po: curses.h
+fallback.po: fallback.c
+fallback.po: ncurses_def.h
+fallback.po: term.h
+fallback.po: unctrl.h
+free_ttype.So: curses.h
+free_ttype.So: ncurses_def.h
+free_ttype.So: term.h
+free_ttype.So: unctrl.h
+free_ttype.o: curses.h
+free_ttype.o: ncurses_def.h
+free_ttype.o: term.h
+free_ttype.o: unctrl.h
+free_ttype.po: curses.h
+free_ttype.po: ncurses_def.h
+free_ttype.po: term.h
+free_ttype.po: unctrl.h
+getenv_num.So: curses.h
+getenv_num.So: ncurses_def.h
+getenv_num.So: term.h
+getenv_num.So: unctrl.h
+getenv_num.o: curses.h
+getenv_num.o: ncurses_def.h
+getenv_num.o: term.h
+getenv_num.o: unctrl.h
+getenv_num.po: curses.h
+getenv_num.po: ncurses_def.h
+getenv_num.po: term.h
+getenv_num.po: unctrl.h
+hardscroll.So: curses.h
+hardscroll.So: ncurses_def.h
+hardscroll.So: term.h
+hardscroll.So: unctrl.h
+hardscroll.o: curses.h
+hardscroll.o: ncurses_def.h
+hardscroll.o: term.h
+hardscroll.o: unctrl.h
+hardscroll.po: curses.h
+hardscroll.po: ncurses_def.h
+hardscroll.po: term.h
+hardscroll.po: unctrl.h
+hashed_db.So: curses.h
+hashed_db.So: ncurses_def.h
+hashed_db.So: term.h
+hashed_db.So: unctrl.h
+hashed_db.o: curses.h
+hashed_db.o: ncurses_def.h
+hashed_db.o: term.h
+hashed_db.o: unctrl.h
+hashed_db.po: curses.h
+hashed_db.po: ncurses_def.h
+hashed_db.po: term.h
+hashed_db.po: unctrl.h
+hashmap.So: curses.h
+hashmap.So: ncurses_def.h
+hashmap.So: term.h
+hashmap.So: unctrl.h
+hashmap.o: curses.h
+hashmap.o: ncurses_def.h
+hashmap.o: term.h
+hashmap.o: unctrl.h
+hashmap.po: curses.h
+hashmap.po: ncurses_def.h
+hashmap.po: term.h
+hashmap.po: unctrl.h
+home_terminfo.So: curses.h
+home_terminfo.So: ncurses_def.h
+home_terminfo.So: term.h
+home_terminfo.So: unctrl.h
+home_terminfo.o: curses.h
+home_terminfo.o: ncurses_def.h
+home_terminfo.o: term.h
+home_terminfo.o: unctrl.h
+home_terminfo.po: curses.h
+home_terminfo.po: ncurses_def.h
+home_terminfo.po: term.h
+home_terminfo.po: unctrl.h
+init_keytry.So: curses.h
+init_keytry.So: init_keytry.h
+init_keytry.So: ncurses_def.h
+init_keytry.So: term.h
+init_keytry.So: unctrl.h
+init_keytry.o: curses.h
+init_keytry.o: init_keytry.h
+init_keytry.o: ncurses_def.h
+init_keytry.o: term.h
+init_keytry.o: unctrl.h
+init_keytry.po: curses.h
+init_keytry.po: init_keytry.h
+init_keytry.po: ncurses_def.h
+init_keytry.po: term.h
+init_keytry.po: unctrl.h
+key_defined.So: curses.h
+key_defined.So: ncurses_def.h
+key_defined.So: term.h
+key_defined.So: unctrl.h
+key_defined.o: curses.h
+key_defined.o: ncurses_def.h
+key_defined.o: term.h
+key_defined.o: unctrl.h
+key_defined.po: curses.h
+key_defined.po: ncurses_def.h
+key_defined.po: term.h
+key_defined.po: unctrl.h
+keybound.So: curses.h
+keybound.So: ncurses_def.h
+keybound.So: term.h
+keybound.So: unctrl.h
+keybound.o: curses.h
+keybound.o: ncurses_def.h
+keybound.o: term.h
+keybound.o: unctrl.h
+keybound.po: curses.h
+keybound.po: ncurses_def.h
+keybound.po: term.h
+keybound.po: unctrl.h
+keyok.So: curses.h
+keyok.So: ncurses_def.h
+keyok.So: term.h
+keyok.So: unctrl.h
+keyok.o: curses.h
+keyok.o: ncurses_def.h
+keyok.o: term.h
+keyok.o: unctrl.h
+keyok.po: curses.h
+keyok.po: ncurses_def.h
+keyok.po: term.h
+keyok.po: unctrl.h
+legacy_coding.So: curses.h
+legacy_coding.So: ncurses_def.h
+legacy_coding.So: term.h
+legacy_coding.So: unctrl.h
+legacy_coding.o: curses.h
+legacy_coding.o: ncurses_def.h
+legacy_coding.o: term.h
+legacy_coding.o: unctrl.h
+legacy_coding.po: curses.h
+legacy_coding.po: ncurses_def.h
+legacy_coding.po: term.h
+legacy_coding.po: unctrl.h
+lib_acs.So: curses.h
+lib_acs.So: ncurses_def.h
+lib_acs.So: term.h
+lib_acs.So: unctrl.h
+lib_acs.o: curses.h
+lib_acs.o: ncurses_def.h
+lib_acs.o: term.h
+lib_acs.o: unctrl.h
+lib_acs.po: curses.h
+lib_acs.po: ncurses_def.h
+lib_acs.po: term.h
+lib_acs.po: unctrl.h
+lib_add_wch.So: curses.h
+lib_add_wch.So: ncurses_def.h
+lib_add_wch.So: term.h
+lib_add_wch.So: unctrl.h
+lib_add_wch.o: curses.h
+lib_add_wch.o: ncurses_def.h
+lib_add_wch.o: term.h
+lib_add_wch.o: unctrl.h
+lib_add_wch.po: curses.h
+lib_add_wch.po: ncurses_def.h
+lib_add_wch.po: term.h
+lib_add_wch.po: unctrl.h
+lib_addch.So: curses.h
+lib_addch.So: ncurses_def.h
+lib_addch.So: term.h
+lib_addch.So: unctrl.h
+lib_addch.o: curses.h
+lib_addch.o: ncurses_def.h
+lib_addch.o: term.h
+lib_addch.o: unctrl.h
+lib_addch.po: curses.h
+lib_addch.po: ncurses_def.h
+lib_addch.po: term.h
+lib_addch.po: unctrl.h
+lib_addstr.So: curses.h
+lib_addstr.So: ncurses_def.h
+lib_addstr.So: term.h
+lib_addstr.So: unctrl.h
+lib_addstr.o: curses.h
+lib_addstr.o: ncurses_def.h
+lib_addstr.o: term.h
+lib_addstr.o: unctrl.h
+lib_addstr.po: curses.h
+lib_addstr.po: ncurses_def.h
+lib_addstr.po: term.h
+lib_addstr.po: unctrl.h
+lib_baudrate.So: curses.h
+lib_baudrate.So: ncurses_def.h
+lib_baudrate.So: term.h
+lib_baudrate.So: termcap.h
+lib_baudrate.So: unctrl.h
+lib_baudrate.o: curses.h
+lib_baudrate.o: ncurses_def.h
+lib_baudrate.o: term.h
+lib_baudrate.o: termcap.h
+lib_baudrate.o: unctrl.h
+lib_baudrate.po: curses.h
+lib_baudrate.po: ncurses_def.h
+lib_baudrate.po: term.h
+lib_baudrate.po: termcap.h
+lib_baudrate.po: unctrl.h
+lib_beep.So: curses.h
+lib_beep.So: ncurses_def.h
+lib_beep.So: term.h
+lib_beep.So: unctrl.h
+lib_beep.o: curses.h
+lib_beep.o: ncurses_def.h
+lib_beep.o: term.h
+lib_beep.o: unctrl.h
+lib_beep.po: curses.h
+lib_beep.po: ncurses_def.h
+lib_beep.po: term.h
+lib_beep.po: unctrl.h
+lib_bkgd.So: curses.h
+lib_bkgd.So: ncurses_def.h
+lib_bkgd.So: term.h
+lib_bkgd.So: unctrl.h
+lib_bkgd.o: curses.h
+lib_bkgd.o: ncurses_def.h
+lib_bkgd.o: term.h
+lib_bkgd.o: unctrl.h
+lib_bkgd.po: curses.h
+lib_bkgd.po: ncurses_def.h
+lib_bkgd.po: term.h
+lib_bkgd.po: unctrl.h
+lib_box.So: curses.h
+lib_box.So: ncurses_def.h
+lib_box.So: term.h
+lib_box.So: unctrl.h
+lib_box.o: curses.h
+lib_box.o: ncurses_def.h
+lib_box.o: term.h
+lib_box.o: unctrl.h
+lib_box.po: curses.h
+lib_box.po: ncurses_def.h
+lib_box.po: term.h
+lib_box.po: unctrl.h
+lib_box_set.So: curses.h
+lib_box_set.So: ncurses_def.h
+lib_box_set.So: term.h
+lib_box_set.So: unctrl.h
+lib_box_set.o: curses.h
+lib_box_set.o: ncurses_def.h
+lib_box_set.o: term.h
+lib_box_set.o: unctrl.h
+lib_box_set.po: curses.h
+lib_box_set.po: ncurses_def.h
+lib_box_set.po: term.h
+lib_box_set.po: unctrl.h
+lib_cchar.So: curses.h
+lib_cchar.So: ncurses_def.h
+lib_cchar.So: term.h
+lib_cchar.So: unctrl.h
+lib_cchar.o: curses.h
+lib_cchar.o: ncurses_def.h
+lib_cchar.o: term.h
+lib_cchar.o: unctrl.h
+lib_cchar.po: curses.h
+lib_cchar.po: ncurses_def.h
+lib_cchar.po: term.h
+lib_cchar.po: unctrl.h
+lib_chgat.So: curses.h
+lib_chgat.So: ncurses_def.h
+lib_chgat.So: term.h
+lib_chgat.So: unctrl.h
+lib_chgat.o: curses.h
+lib_chgat.o: ncurses_def.h
+lib_chgat.o: term.h
+lib_chgat.o: unctrl.h
+lib_chgat.po: curses.h
+lib_chgat.po: ncurses_def.h
+lib_chgat.po: term.h
+lib_chgat.po: unctrl.h
+lib_clear.So: curses.h
+lib_clear.So: ncurses_def.h
+lib_clear.So: term.h
+lib_clear.So: unctrl.h
+lib_clear.o: curses.h
+lib_clear.o: ncurses_def.h
+lib_clear.o: term.h
+lib_clear.o: unctrl.h
+lib_clear.po: curses.h
+lib_clear.po: ncurses_def.h
+lib_clear.po: term.h
+lib_clear.po: unctrl.h
+lib_clearok.So: curses.h
+lib_clearok.So: ncurses_def.h
+lib_clearok.So: term.h
+lib_clearok.So: unctrl.h
+lib_clearok.o: curses.h
+lib_clearok.o: ncurses_def.h
+lib_clearok.o: term.h
+lib_clearok.o: unctrl.h
+lib_clearok.po: curses.h
+lib_clearok.po: ncurses_def.h
+lib_clearok.po: term.h
+lib_clearok.po: unctrl.h
+lib_clrbot.So: curses.h
+lib_clrbot.So: ncurses_def.h
+lib_clrbot.So: term.h
+lib_clrbot.So: unctrl.h
+lib_clrbot.o: curses.h
+lib_clrbot.o: ncurses_def.h
+lib_clrbot.o: term.h
+lib_clrbot.o: unctrl.h
+lib_clrbot.po: curses.h
+lib_clrbot.po: ncurses_def.h
+lib_clrbot.po: term.h
+lib_clrbot.po: unctrl.h
+lib_clreol.So: curses.h
+lib_clreol.So: ncurses_def.h
+lib_clreol.So: term.h
+lib_clreol.So: unctrl.h
+lib_clreol.o: curses.h
+lib_clreol.o: ncurses_def.h
+lib_clreol.o: term.h
+lib_clreol.o: unctrl.h
+lib_clreol.po: curses.h
+lib_clreol.po: ncurses_def.h
+lib_clreol.po: term.h
+lib_clreol.po: unctrl.h
+lib_color.So: curses.h
+lib_color.So: ncurses_def.h
+lib_color.So: term.h
+lib_color.So: unctrl.h
+lib_color.o: curses.h
+lib_color.o: ncurses_def.h
+lib_color.o: term.h
+lib_color.o: unctrl.h
+lib_color.po: curses.h
+lib_color.po: ncurses_def.h
+lib_color.po: term.h
+lib_color.po: unctrl.h
+lib_colorset.So: curses.h
+lib_colorset.So: ncurses_def.h
+lib_colorset.So: term.h
+lib_colorset.So: unctrl.h
+lib_colorset.o: curses.h
+lib_colorset.o: ncurses_def.h
+lib_colorset.o: term.h
+lib_colorset.o: unctrl.h
+lib_colorset.po: curses.h
+lib_colorset.po: ncurses_def.h
+lib_colorset.po: term.h
+lib_colorset.po: unctrl.h
+lib_cur_term.So: curses.h
+lib_cur_term.So: ncurses_def.h
+lib_cur_term.So: term.h
+lib_cur_term.So: termcap.h
+lib_cur_term.So: unctrl.h
+lib_cur_term.o: curses.h
+lib_cur_term.o: ncurses_def.h
+lib_cur_term.o: term.h
+lib_cur_term.o: termcap.h
+lib_cur_term.o: unctrl.h
+lib_cur_term.po: curses.h
+lib_cur_term.po: ncurses_def.h
+lib_cur_term.po: term.h
+lib_cur_term.po: termcap.h
+lib_cur_term.po: unctrl.h
+lib_data.So: curses.h
+lib_data.So: ncurses_def.h
+lib_data.So: term.h
+lib_data.So: unctrl.h
+lib_data.o: curses.h
+lib_data.o: ncurses_def.h
+lib_data.o: term.h
+lib_data.o: unctrl.h
+lib_data.po: curses.h
+lib_data.po: ncurses_def.h
+lib_data.po: term.h
+lib_data.po: unctrl.h
+lib_delch.So: curses.h
+lib_delch.So: ncurses_def.h
+lib_delch.So: term.h
+lib_delch.So: unctrl.h
+lib_delch.o: curses.h
+lib_delch.o: ncurses_def.h
+lib_delch.o: term.h
+lib_delch.o: unctrl.h
+lib_delch.po: curses.h
+lib_delch.po: ncurses_def.h
+lib_delch.po: term.h
+lib_delch.po: unctrl.h
+lib_delwin.So: curses.h
+lib_delwin.So: ncurses_def.h
+lib_delwin.So: term.h
+lib_delwin.So: unctrl.h
+lib_delwin.o: curses.h
+lib_delwin.o: ncurses_def.h
+lib_delwin.o: term.h
+lib_delwin.o: unctrl.h
+lib_delwin.po: curses.h
+lib_delwin.po: ncurses_def.h
+lib_delwin.po: term.h
+lib_delwin.po: unctrl.h
+lib_dft_fgbg.So: curses.h
+lib_dft_fgbg.So: ncurses_def.h
+lib_dft_fgbg.So: term.h
+lib_dft_fgbg.So: unctrl.h
+lib_dft_fgbg.o: curses.h
+lib_dft_fgbg.o: ncurses_def.h
+lib_dft_fgbg.o: term.h
+lib_dft_fgbg.o: unctrl.h
+lib_dft_fgbg.po: curses.h
+lib_dft_fgbg.po: ncurses_def.h
+lib_dft_fgbg.po: term.h
+lib_dft_fgbg.po: unctrl.h
+lib_echo.So: curses.h
+lib_echo.So: ncurses_def.h
+lib_echo.So: term.h
+lib_echo.So: unctrl.h
+lib_echo.o: curses.h
+lib_echo.o: ncurses_def.h
+lib_echo.o: term.h
+lib_echo.o: unctrl.h
+lib_echo.po: curses.h
+lib_echo.po: ncurses_def.h
+lib_echo.po: term.h
+lib_echo.po: unctrl.h
+lib_endwin.So: curses.h
+lib_endwin.So: ncurses_def.h
+lib_endwin.So: term.h
+lib_endwin.So: unctrl.h
+lib_endwin.o: curses.h
+lib_endwin.o: ncurses_def.h
+lib_endwin.o: term.h
+lib_endwin.o: unctrl.h
+lib_endwin.po: curses.h
+lib_endwin.po: ncurses_def.h
+lib_endwin.po: term.h
+lib_endwin.po: unctrl.h
+lib_erase.So: curses.h
+lib_erase.So: ncurses_def.h
+lib_erase.So: term.h
+lib_erase.So: unctrl.h
+lib_erase.o: curses.h
+lib_erase.o: ncurses_def.h
+lib_erase.o: term.h
+lib_erase.o: unctrl.h
+lib_erase.po: curses.h
+lib_erase.po: ncurses_def.h
+lib_erase.po: term.h
+lib_erase.po: unctrl.h
+lib_erasewchar.So: curses.h
+lib_erasewchar.So: ncurses_def.h
+lib_erasewchar.So: term.h
+lib_erasewchar.So: unctrl.h
+lib_erasewchar.o: curses.h
+lib_erasewchar.o: ncurses_def.h
+lib_erasewchar.o: term.h
+lib_erasewchar.o: unctrl.h
+lib_erasewchar.po: curses.h
+lib_erasewchar.po: ncurses_def.h
+lib_erasewchar.po: term.h
+lib_erasewchar.po: unctrl.h
+lib_flash.So: curses.h
+lib_flash.So: ncurses_def.h
+lib_flash.So: term.h
+lib_flash.So: unctrl.h
+lib_flash.o: curses.h
+lib_flash.o: ncurses_def.h
+lib_flash.o: term.h
+lib_flash.o: unctrl.h
+lib_flash.po: curses.h
+lib_flash.po: ncurses_def.h
+lib_flash.po: term.h
+lib_flash.po: unctrl.h
+lib_freeall.So: curses.h
+lib_freeall.So: ncurses_def.h
+lib_freeall.So: term.h
+lib_freeall.So: unctrl.h
+lib_freeall.o: curses.h
+lib_freeall.o: ncurses_def.h
+lib_freeall.o: term.h
+lib_freeall.o: unctrl.h
+lib_freeall.po: curses.h
+lib_freeall.po: ncurses_def.h
+lib_freeall.po: term.h
+lib_freeall.po: unctrl.h
+lib_gen.So: curses.h
+lib_gen.So: lib_gen.c
+lib_gen.So: ncurses_def.h
+lib_gen.So: term.h
+lib_gen.So: unctrl.h
+lib_gen.o: curses.h
+lib_gen.o: lib_gen.c
+lib_gen.o: ncurses_def.h
+lib_gen.o: term.h
+lib_gen.o: unctrl.h
+lib_gen.po: curses.h
+lib_gen.po: lib_gen.c
+lib_gen.po: ncurses_def.h
+lib_gen.po: term.h
+lib_gen.po: unctrl.h
+lib_get_wch.So: curses.h
+lib_get_wch.So: ncurses_def.h
+lib_get_wch.So: term.h
+lib_get_wch.So: unctrl.h
+lib_get_wch.o: curses.h
+lib_get_wch.o: ncurses_def.h
+lib_get_wch.o: term.h
+lib_get_wch.o: unctrl.h
+lib_get_wch.po: curses.h
+lib_get_wch.po: ncurses_def.h
+lib_get_wch.po: term.h
+lib_get_wch.po: unctrl.h
+lib_get_wstr.So: curses.h
+lib_get_wstr.So: ncurses_def.h
+lib_get_wstr.So: term.h
+lib_get_wstr.So: unctrl.h
+lib_get_wstr.o: curses.h
+lib_get_wstr.o: ncurses_def.h
+lib_get_wstr.o: term.h
+lib_get_wstr.o: unctrl.h
+lib_get_wstr.po: curses.h
+lib_get_wstr.po: ncurses_def.h
+lib_get_wstr.po: term.h
+lib_get_wstr.po: unctrl.h
+lib_getch.So: curses.h
+lib_getch.So: ncurses_def.h
+lib_getch.So: term.h
+lib_getch.So: unctrl.h
+lib_getch.o: curses.h
+lib_getch.o: ncurses_def.h
+lib_getch.o: term.h
+lib_getch.o: unctrl.h
+lib_getch.po: curses.h
+lib_getch.po: ncurses_def.h
+lib_getch.po: term.h
+lib_getch.po: unctrl.h
+lib_getstr.So: curses.h
+lib_getstr.So: ncurses_def.h
+lib_getstr.So: term.h
+lib_getstr.So: unctrl.h
+lib_getstr.o: curses.h
+lib_getstr.o: ncurses_def.h
+lib_getstr.o: term.h
+lib_getstr.o: unctrl.h
+lib_getstr.po: curses.h
+lib_getstr.po: ncurses_def.h
+lib_getstr.po: term.h
+lib_getstr.po: unctrl.h
+lib_has_cap.So: curses.h
+lib_has_cap.So: ncurses_def.h
+lib_has_cap.So: term.h
+lib_has_cap.So: unctrl.h
+lib_has_cap.o: curses.h
+lib_has_cap.o: ncurses_def.h
+lib_has_cap.o: term.h
+lib_has_cap.o: unctrl.h
+lib_has_cap.po: curses.h
+lib_has_cap.po: ncurses_def.h
+lib_has_cap.po: term.h
+lib_has_cap.po: unctrl.h
+lib_hline.So: curses.h
+lib_hline.So: ncurses_def.h
+lib_hline.So: term.h
+lib_hline.So: unctrl.h
+lib_hline.o: curses.h
+lib_hline.o: ncurses_def.h
+lib_hline.o: term.h
+lib_hline.o: unctrl.h
+lib_hline.po: curses.h
+lib_hline.po: ncurses_def.h
+lib_hline.po: term.h
+lib_hline.po: unctrl.h
+lib_hline_set.So: curses.h
+lib_hline_set.So: ncurses_def.h
+lib_hline_set.So: term.h
+lib_hline_set.So: unctrl.h
+lib_hline_set.o: curses.h
+lib_hline_set.o: ncurses_def.h
+lib_hline_set.o: term.h
+lib_hline_set.o: unctrl.h
+lib_hline_set.po: curses.h
+lib_hline_set.po: ncurses_def.h
+lib_hline_set.po: term.h
+lib_hline_set.po: unctrl.h
+lib_immedok.So: curses.h
+lib_immedok.So: ncurses_def.h
+lib_immedok.So: term.h
+lib_immedok.So: unctrl.h
+lib_immedok.o: curses.h
+lib_immedok.o: ncurses_def.h
+lib_immedok.o: term.h
+lib_immedok.o: unctrl.h
+lib_immedok.po: curses.h
+lib_immedok.po: ncurses_def.h
+lib_immedok.po: term.h
+lib_immedok.po: unctrl.h
+lib_in_wch.So: curses.h
+lib_in_wch.So: ncurses_def.h
+lib_in_wch.So: term.h
+lib_in_wch.So: unctrl.h
+lib_in_wch.o: curses.h
+lib_in_wch.o: ncurses_def.h
+lib_in_wch.o: term.h
+lib_in_wch.o: unctrl.h
+lib_in_wch.po: curses.h
+lib_in_wch.po: ncurses_def.h
+lib_in_wch.po: term.h
+lib_in_wch.po: unctrl.h
+lib_in_wchnstr.So: curses.h
+lib_in_wchnstr.So: ncurses_def.h
+lib_in_wchnstr.So: term.h
+lib_in_wchnstr.So: unctrl.h
+lib_in_wchnstr.o: curses.h
+lib_in_wchnstr.o: ncurses_def.h
+lib_in_wchnstr.o: term.h
+lib_in_wchnstr.o: unctrl.h
+lib_in_wchnstr.po: curses.h
+lib_in_wchnstr.po: ncurses_def.h
+lib_in_wchnstr.po: term.h
+lib_in_wchnstr.po: unctrl.h
+lib_inchstr.So: curses.h
+lib_inchstr.So: ncurses_def.h
+lib_inchstr.So: term.h
+lib_inchstr.So: unctrl.h
+lib_inchstr.o: curses.h
+lib_inchstr.o: ncurses_def.h
+lib_inchstr.o: term.h
+lib_inchstr.o: unctrl.h
+lib_inchstr.po: curses.h
+lib_inchstr.po: ncurses_def.h
+lib_inchstr.po: term.h
+lib_inchstr.po: unctrl.h
+lib_initscr.So: curses.h
+lib_initscr.So: ncurses_def.h
+lib_initscr.So: term.h
+lib_initscr.So: unctrl.h
+lib_initscr.o: curses.h
+lib_initscr.o: ncurses_def.h
+lib_initscr.o: term.h
+lib_initscr.o: unctrl.h
+lib_initscr.po: curses.h
+lib_initscr.po: ncurses_def.h
+lib_initscr.po: term.h
+lib_initscr.po: unctrl.h
+lib_ins_wch.So: curses.h
+lib_ins_wch.So: ncurses_def.h
+lib_ins_wch.So: term.h
+lib_ins_wch.So: unctrl.h
+lib_ins_wch.o: curses.h
+lib_ins_wch.o: ncurses_def.h
+lib_ins_wch.o: term.h
+lib_ins_wch.o: unctrl.h
+lib_ins_wch.po: curses.h
+lib_ins_wch.po: ncurses_def.h
+lib_ins_wch.po: term.h
+lib_ins_wch.po: unctrl.h
+lib_insch.So: curses.h
+lib_insch.So: ncurses_def.h
+lib_insch.So: term.h
+lib_insch.So: unctrl.h
+lib_insch.o: curses.h
+lib_insch.o: ncurses_def.h
+lib_insch.o: term.h
+lib_insch.o: unctrl.h
+lib_insch.po: curses.h
+lib_insch.po: ncurses_def.h
+lib_insch.po: term.h
+lib_insch.po: unctrl.h
+lib_insdel.So: curses.h
+lib_insdel.So: ncurses_def.h
+lib_insdel.So: term.h
+lib_insdel.So: unctrl.h
+lib_insdel.o: curses.h
+lib_insdel.o: ncurses_def.h
+lib_insdel.o: term.h
+lib_insdel.o: unctrl.h
+lib_insdel.po: curses.h
+lib_insdel.po: ncurses_def.h
+lib_insdel.po: term.h
+lib_insdel.po: unctrl.h
+lib_insnstr.So: curses.h
+lib_insnstr.So: ncurses_def.h
+lib_insnstr.So: term.h
+lib_insnstr.So: unctrl.h
+lib_insnstr.o: curses.h
+lib_insnstr.o: ncurses_def.h
+lib_insnstr.o: term.h
+lib_insnstr.o: unctrl.h
+lib_insnstr.po: curses.h
+lib_insnstr.po: ncurses_def.h
+lib_insnstr.po: term.h
+lib_insnstr.po: unctrl.h
+lib_instr.So: curses.h
+lib_instr.So: ncurses_def.h
+lib_instr.So: term.h
+lib_instr.So: unctrl.h
+lib_instr.o: curses.h
+lib_instr.o: ncurses_def.h
+lib_instr.o: term.h
+lib_instr.o: unctrl.h
+lib_instr.po: curses.h
+lib_instr.po: ncurses_def.h
+lib_instr.po: term.h
+lib_instr.po: unctrl.h
+lib_inwstr.So: curses.h
+lib_inwstr.So: ncurses_def.h
+lib_inwstr.So: term.h
+lib_inwstr.So: unctrl.h
+lib_inwstr.o: curses.h
+lib_inwstr.o: ncurses_def.h
+lib_inwstr.o: term.h
+lib_inwstr.o: unctrl.h
+lib_inwstr.po: curses.h
+lib_inwstr.po: ncurses_def.h
+lib_inwstr.po: term.h
+lib_inwstr.po: unctrl.h
+lib_isendwin.So: curses.h
+lib_isendwin.So: ncurses_def.h
+lib_isendwin.So: term.h
+lib_isendwin.So: unctrl.h
+lib_isendwin.o: curses.h
+lib_isendwin.o: ncurses_def.h
+lib_isendwin.o: term.h
+lib_isendwin.o: unctrl.h
+lib_isendwin.po: curses.h
+lib_isendwin.po: ncurses_def.h
+lib_isendwin.po: term.h
+lib_isendwin.po: unctrl.h
+lib_kernel.So: curses.h
+lib_kernel.So: ncurses_def.h
+lib_kernel.So: term.h
+lib_kernel.So: unctrl.h
+lib_kernel.o: curses.h
+lib_kernel.o: ncurses_def.h
+lib_kernel.o: term.h
+lib_kernel.o: unctrl.h
+lib_kernel.po: curses.h
+lib_kernel.po: ncurses_def.h
+lib_kernel.po: term.h
+lib_kernel.po: unctrl.h
+lib_key_name.So: curses.h
+lib_key_name.So: ncurses_def.h
+lib_key_name.So: term.h
+lib_key_name.So: unctrl.h
+lib_key_name.o: curses.h
+lib_key_name.o: ncurses_def.h
+lib_key_name.o: term.h
+lib_key_name.o: unctrl.h
+lib_key_name.po: curses.h
+lib_key_name.po: ncurses_def.h
+lib_key_name.po: term.h
+lib_key_name.po: unctrl.h
+lib_keyname.So: curses.h
+lib_keyname.So: lib_keyname.c
+lib_keyname.So: ncurses_def.h
+lib_keyname.So: term.h
+lib_keyname.So: unctrl.h
+lib_keyname.o: curses.h
+lib_keyname.o: lib_keyname.c
+lib_keyname.o: ncurses_def.h
+lib_keyname.o: term.h
+lib_keyname.o: unctrl.h
+lib_keyname.po: curses.h
+lib_keyname.po: lib_keyname.c
+lib_keyname.po: ncurses_def.h
+lib_keyname.po: term.h
+lib_keyname.po: unctrl.h
+lib_leaveok.So: curses.h
+lib_leaveok.So: ncurses_def.h
+lib_leaveok.So: term.h
+lib_leaveok.So: unctrl.h
+lib_leaveok.o: curses.h
+lib_leaveok.o: ncurses_def.h
+lib_leaveok.o: term.h
+lib_leaveok.o: unctrl.h
+lib_leaveok.po: curses.h
+lib_leaveok.po: ncurses_def.h
+lib_leaveok.po: term.h
+lib_leaveok.po: unctrl.h
+lib_longname.So: curses.h
+lib_longname.So: ncurses_def.h
+lib_longname.So: term.h
+lib_longname.So: unctrl.h
+lib_longname.o: curses.h
+lib_longname.o: ncurses_def.h
+lib_longname.o: term.h
+lib_longname.o: unctrl.h
+lib_longname.po: curses.h
+lib_longname.po: ncurses_def.h
+lib_longname.po: term.h
+lib_longname.po: unctrl.h
+lib_mouse.So: curses.h
+lib_mouse.So: ncurses_def.h
+lib_mouse.So: term.h
+lib_mouse.So: unctrl.h
+lib_mouse.o: curses.h
+lib_mouse.o: ncurses_def.h
+lib_mouse.o: term.h
+lib_mouse.o: unctrl.h
+lib_mouse.po: curses.h
+lib_mouse.po: ncurses_def.h
+lib_mouse.po: term.h
+lib_mouse.po: unctrl.h
+lib_move.So: curses.h
+lib_move.So: ncurses_def.h
+lib_move.So: term.h
+lib_move.So: unctrl.h
+lib_move.o: curses.h
+lib_move.o: ncurses_def.h
+lib_move.o: term.h
+lib_move.o: unctrl.h
+lib_move.po: curses.h
+lib_move.po: ncurses_def.h
+lib_move.po: term.h
+lib_move.po: unctrl.h
+lib_mvcur.So: curses.h
+lib_mvcur.So: ncurses_def.h
+lib_mvcur.So: term.h
+lib_mvcur.So: unctrl.h
+lib_mvcur.o: curses.h
+lib_mvcur.o: ncurses_def.h
+lib_mvcur.o: term.h
+lib_mvcur.o: unctrl.h
+lib_mvcur.po: curses.h
+lib_mvcur.po: ncurses_def.h
+lib_mvcur.po: term.h
+lib_mvcur.po: unctrl.h
+lib_mvwin.So: curses.h
+lib_mvwin.So: ncurses_def.h
+lib_mvwin.So: term.h
+lib_mvwin.So: unctrl.h
+lib_mvwin.o: curses.h
+lib_mvwin.o: ncurses_def.h
+lib_mvwin.o: term.h
+lib_mvwin.o: unctrl.h
+lib_mvwin.po: curses.h
+lib_mvwin.po: ncurses_def.h
+lib_mvwin.po: term.h
+lib_mvwin.po: unctrl.h
+lib_napms.So: curses.h
+lib_napms.So: ncurses_def.h
+lib_napms.So: term.h
+lib_napms.So: unctrl.h
+lib_napms.o: curses.h
+lib_napms.o: ncurses_def.h
+lib_napms.o: term.h
+lib_napms.o: unctrl.h
+lib_napms.po: curses.h
+lib_napms.po: ncurses_def.h
+lib_napms.po: term.h
+lib_napms.po: unctrl.h
+lib_newterm.So: curses.h
+lib_newterm.So: ncurses_def.h
+lib_newterm.So: term.h
+lib_newterm.So: unctrl.h
+lib_newterm.o: curses.h
+lib_newterm.o: ncurses_def.h
+lib_newterm.o: term.h
+lib_newterm.o: unctrl.h
+lib_newterm.po: curses.h
+lib_newterm.po: ncurses_def.h
+lib_newterm.po: term.h
+lib_newterm.po: unctrl.h
+lib_newwin.So: curses.h
+lib_newwin.So: ncurses_def.h
+lib_newwin.So: term.h
+lib_newwin.So: unctrl.h
+lib_newwin.o: curses.h
+lib_newwin.o: ncurses_def.h
+lib_newwin.o: term.h
+lib_newwin.o: unctrl.h
+lib_newwin.po: curses.h
+lib_newwin.po: ncurses_def.h
+lib_newwin.po: term.h
+lib_newwin.po: unctrl.h
+lib_nl.So: curses.h
+lib_nl.So: ncurses_def.h
+lib_nl.So: term.h
+lib_nl.So: unctrl.h
+lib_nl.o: curses.h
+lib_nl.o: ncurses_def.h
+lib_nl.o: term.h
+lib_nl.o: unctrl.h
+lib_nl.po: curses.h
+lib_nl.po: ncurses_def.h
+lib_nl.po: term.h
+lib_nl.po: unctrl.h
+lib_options.So: curses.h
+lib_options.So: ncurses_def.h
+lib_options.So: term.h
+lib_options.So: unctrl.h
+lib_options.o: curses.h
+lib_options.o: ncurses_def.h
+lib_options.o: term.h
+lib_options.o: unctrl.h
+lib_options.po: curses.h
+lib_options.po: ncurses_def.h
+lib_options.po: term.h
+lib_options.po: unctrl.h
+lib_overlay.So: curses.h
+lib_overlay.So: ncurses_def.h
+lib_overlay.So: term.h
+lib_overlay.So: unctrl.h
+lib_overlay.o: curses.h
+lib_overlay.o: ncurses_def.h
+lib_overlay.o: term.h
+lib_overlay.o: unctrl.h
+lib_overlay.po: curses.h
+lib_overlay.po: ncurses_def.h
+lib_overlay.po: term.h
+lib_overlay.po: unctrl.h
+lib_pad.So: curses.h
+lib_pad.So: ncurses_def.h
+lib_pad.So: term.h
+lib_pad.So: unctrl.h
+lib_pad.o: curses.h
+lib_pad.o: ncurses_def.h
+lib_pad.o: term.h
+lib_pad.o: unctrl.h
+lib_pad.po: curses.h
+lib_pad.po: ncurses_def.h
+lib_pad.po: term.h
+lib_pad.po: unctrl.h
+lib_pecho_wchar.So: curses.h
+lib_pecho_wchar.So: ncurses_def.h
+lib_pecho_wchar.So: term.h
+lib_pecho_wchar.So: unctrl.h
+lib_pecho_wchar.o: curses.h
+lib_pecho_wchar.o: ncurses_def.h
+lib_pecho_wchar.o: term.h
+lib_pecho_wchar.o: unctrl.h
+lib_pecho_wchar.po: curses.h
+lib_pecho_wchar.po: ncurses_def.h
+lib_pecho_wchar.po: term.h
+lib_pecho_wchar.po: unctrl.h
+lib_print.So: curses.h
+lib_print.So: ncurses_def.h
+lib_print.So: term.h
+lib_print.So: unctrl.h
+lib_print.o: curses.h
+lib_print.o: ncurses_def.h
+lib_print.o: term.h
+lib_print.o: unctrl.h
+lib_print.po: curses.h
+lib_print.po: ncurses_def.h
+lib_print.po: term.h
+lib_print.po: unctrl.h
+lib_printw.So: curses.h
+lib_printw.So: ncurses_def.h
+lib_printw.So: term.h
+lib_printw.So: unctrl.h
+lib_printw.o: curses.h
+lib_printw.o: ncurses_def.h
+lib_printw.o: term.h
+lib_printw.o: unctrl.h
+lib_printw.po: curses.h
+lib_printw.po: ncurses_def.h
+lib_printw.po: term.h
+lib_printw.po: unctrl.h
+lib_raw.So: curses.h
+lib_raw.So: ncurses_def.h
+lib_raw.So: term.h
+lib_raw.So: unctrl.h
+lib_raw.o: curses.h
+lib_raw.o: ncurses_def.h
+lib_raw.o: term.h
+lib_raw.o: unctrl.h
+lib_raw.po: curses.h
+lib_raw.po: ncurses_def.h
+lib_raw.po: term.h
+lib_raw.po: unctrl.h
+lib_redrawln.So: curses.h
+lib_redrawln.So: ncurses_def.h
+lib_redrawln.So: term.h
+lib_redrawln.So: unctrl.h
+lib_redrawln.o: curses.h
+lib_redrawln.o: ncurses_def.h
+lib_redrawln.o: term.h
+lib_redrawln.o: unctrl.h
+lib_redrawln.po: curses.h
+lib_redrawln.po: ncurses_def.h
+lib_redrawln.po: term.h
+lib_redrawln.po: unctrl.h
+lib_refresh.So: curses.h
+lib_refresh.So: ncurses_def.h
+lib_refresh.So: term.h
+lib_refresh.So: unctrl.h
+lib_refresh.o: curses.h
+lib_refresh.o: ncurses_def.h
+lib_refresh.o: term.h
+lib_refresh.o: unctrl.h
+lib_refresh.po: curses.h
+lib_refresh.po: ncurses_def.h
+lib_refresh.po: term.h
+lib_refresh.po: unctrl.h
+lib_restart.So: curses.h
+lib_restart.So: ncurses_def.h
+lib_restart.So: term.h
+lib_restart.So: unctrl.h
+lib_restart.o: curses.h
+lib_restart.o: ncurses_def.h
+lib_restart.o: term.h
+lib_restart.o: unctrl.h
+lib_restart.po: curses.h
+lib_restart.po: ncurses_def.h
+lib_restart.po: term.h
+lib_restart.po: unctrl.h
+lib_scanw.So: curses.h
+lib_scanw.So: ncurses_def.h
+lib_scanw.So: term.h
+lib_scanw.So: unctrl.h
+lib_scanw.o: curses.h
+lib_scanw.o: ncurses_def.h
+lib_scanw.o: term.h
+lib_scanw.o: unctrl.h
+lib_scanw.po: curses.h
+lib_scanw.po: ncurses_def.h
+lib_scanw.po: term.h
+lib_scanw.po: unctrl.h
+lib_screen.So: curses.h
+lib_screen.So: ncurses_def.h
+lib_screen.So: term.h
+lib_screen.So: unctrl.h
+lib_screen.o: curses.h
+lib_screen.o: ncurses_def.h
+lib_screen.o: term.h
+lib_screen.o: unctrl.h
+lib_screen.po: curses.h
+lib_screen.po: ncurses_def.h
+lib_screen.po: term.h
+lib_screen.po: unctrl.h
+lib_scroll.So: curses.h
+lib_scroll.So: ncurses_def.h
+lib_scroll.So: term.h
+lib_scroll.So: unctrl.h
+lib_scroll.o: curses.h
+lib_scroll.o: ncurses_def.h
+lib_scroll.o: term.h
+lib_scroll.o: unctrl.h
+lib_scroll.po: curses.h
+lib_scroll.po: ncurses_def.h
+lib_scroll.po: term.h
+lib_scroll.po: unctrl.h
+lib_scrollok.So: curses.h
+lib_scrollok.So: ncurses_def.h
+lib_scrollok.So: term.h
+lib_scrollok.So: unctrl.h
+lib_scrollok.o: curses.h
+lib_scrollok.o: ncurses_def.h
+lib_scrollok.o: term.h
+lib_scrollok.o: unctrl.h
+lib_scrollok.po: curses.h
+lib_scrollok.po: ncurses_def.h
+lib_scrollok.po: term.h
+lib_scrollok.po: unctrl.h
+lib_scrreg.So: curses.h
+lib_scrreg.So: ncurses_def.h
+lib_scrreg.So: term.h
+lib_scrreg.So: unctrl.h
+lib_scrreg.o: curses.h
+lib_scrreg.o: ncurses_def.h
+lib_scrreg.o: term.h
+lib_scrreg.o: unctrl.h
+lib_scrreg.po: curses.h
+lib_scrreg.po: ncurses_def.h
+lib_scrreg.po: term.h
+lib_scrreg.po: unctrl.h
+lib_set_term.So: curses.h
+lib_set_term.So: ncurses_def.h
+lib_set_term.So: term.h
+lib_set_term.So: unctrl.h
+lib_set_term.o: curses.h
+lib_set_term.o: ncurses_def.h
+lib_set_term.o: term.h
+lib_set_term.o: unctrl.h
+lib_set_term.po: curses.h
+lib_set_term.po: ncurses_def.h
+lib_set_term.po: term.h
+lib_set_term.po: unctrl.h
+lib_setup.So: curses.h
+lib_setup.So: ncurses_def.h
+lib_setup.So: term.h
+lib_setup.So: unctrl.h
+lib_setup.o: curses.h
+lib_setup.o: ncurses_def.h
+lib_setup.o: term.h
+lib_setup.o: unctrl.h
+lib_setup.po: curses.h
+lib_setup.po: ncurses_def.h
+lib_setup.po: term.h
+lib_setup.po: unctrl.h
+lib_slk.So: curses.h
+lib_slk.So: ncurses_def.h
+lib_slk.So: term.h
+lib_slk.So: unctrl.h
+lib_slk.o: curses.h
+lib_slk.o: ncurses_def.h
+lib_slk.o: term.h
+lib_slk.o: unctrl.h
+lib_slk.po: curses.h
+lib_slk.po: ncurses_def.h
+lib_slk.po: term.h
+lib_slk.po: unctrl.h
+lib_slk_wset.So: curses.h
+lib_slk_wset.So: ncurses_def.h
+lib_slk_wset.So: term.h
+lib_slk_wset.So: unctrl.h
+lib_slk_wset.o: curses.h
+lib_slk_wset.o: ncurses_def.h
+lib_slk_wset.o: term.h
+lib_slk_wset.o: unctrl.h
+lib_slk_wset.po: curses.h
+lib_slk_wset.po: ncurses_def.h
+lib_slk_wset.po: term.h
+lib_slk_wset.po: unctrl.h
+lib_slkatr_set.So: curses.h
+lib_slkatr_set.So: ncurses_def.h
+lib_slkatr_set.So: term.h
+lib_slkatr_set.So: unctrl.h
+lib_slkatr_set.o: curses.h
+lib_slkatr_set.o: ncurses_def.h
+lib_slkatr_set.o: term.h
+lib_slkatr_set.o: unctrl.h
+lib_slkatr_set.po: curses.h
+lib_slkatr_set.po: ncurses_def.h
+lib_slkatr_set.po: term.h
+lib_slkatr_set.po: unctrl.h
+lib_slkatrof.So: curses.h
+lib_slkatrof.So: ncurses_def.h
+lib_slkatrof.So: term.h
+lib_slkatrof.So: unctrl.h
+lib_slkatrof.o: curses.h
+lib_slkatrof.o: ncurses_def.h
+lib_slkatrof.o: term.h
+lib_slkatrof.o: unctrl.h
+lib_slkatrof.po: curses.h
+lib_slkatrof.po: ncurses_def.h
+lib_slkatrof.po: term.h
+lib_slkatrof.po: unctrl.h
+lib_slkatron.So: curses.h
+lib_slkatron.So: ncurses_def.h
+lib_slkatron.So: term.h
+lib_slkatron.So: unctrl.h
+lib_slkatron.o: curses.h
+lib_slkatron.o: ncurses_def.h
+lib_slkatron.o: term.h
+lib_slkatron.o: unctrl.h
+lib_slkatron.po: curses.h
+lib_slkatron.po: ncurses_def.h
+lib_slkatron.po: term.h
+lib_slkatron.po: unctrl.h
+lib_slkatrset.So: curses.h
+lib_slkatrset.So: ncurses_def.h
+lib_slkatrset.So: term.h
+lib_slkatrset.So: unctrl.h
+lib_slkatrset.o: curses.h
+lib_slkatrset.o: ncurses_def.h
+lib_slkatrset.o: term.h
+lib_slkatrset.o: unctrl.h
+lib_slkatrset.po: curses.h
+lib_slkatrset.po: ncurses_def.h
+lib_slkatrset.po: term.h
+lib_slkatrset.po: unctrl.h
+lib_slkattr.So: curses.h
+lib_slkattr.So: ncurses_def.h
+lib_slkattr.So: term.h
+lib_slkattr.So: unctrl.h
+lib_slkattr.o: curses.h
+lib_slkattr.o: ncurses_def.h
+lib_slkattr.o: term.h
+lib_slkattr.o: unctrl.h
+lib_slkattr.po: curses.h
+lib_slkattr.po: ncurses_def.h
+lib_slkattr.po: term.h
+lib_slkattr.po: unctrl.h
+lib_slkclear.So: curses.h
+lib_slkclear.So: ncurses_def.h
+lib_slkclear.So: term.h
+lib_slkclear.So: unctrl.h
+lib_slkclear.o: curses.h
+lib_slkclear.o: ncurses_def.h
+lib_slkclear.o: term.h
+lib_slkclear.o: unctrl.h
+lib_slkclear.po: curses.h
+lib_slkclear.po: ncurses_def.h
+lib_slkclear.po: term.h
+lib_slkclear.po: unctrl.h
+lib_slkcolor.So: curses.h
+lib_slkcolor.So: ncurses_def.h
+lib_slkcolor.So: term.h
+lib_slkcolor.So: unctrl.h
+lib_slkcolor.o: curses.h
+lib_slkcolor.o: ncurses_def.h
+lib_slkcolor.o: term.h
+lib_slkcolor.o: unctrl.h
+lib_slkcolor.po: curses.h
+lib_slkcolor.po: ncurses_def.h
+lib_slkcolor.po: term.h
+lib_slkcolor.po: unctrl.h
+lib_slkinit.So: curses.h
+lib_slkinit.So: ncurses_def.h
+lib_slkinit.So: term.h
+lib_slkinit.So: unctrl.h
+lib_slkinit.o: curses.h
+lib_slkinit.o: ncurses_def.h
+lib_slkinit.o: term.h
+lib_slkinit.o: unctrl.h
+lib_slkinit.po: curses.h
+lib_slkinit.po: ncurses_def.h
+lib_slkinit.po: term.h
+lib_slkinit.po: unctrl.h
+lib_slklab.So: curses.h
+lib_slklab.So: ncurses_def.h
+lib_slklab.So: term.h
+lib_slklab.So: unctrl.h
+lib_slklab.o: curses.h
+lib_slklab.o: ncurses_def.h
+lib_slklab.o: term.h
+lib_slklab.o: unctrl.h
+lib_slklab.po: curses.h
+lib_slklab.po: ncurses_def.h
+lib_slklab.po: term.h
+lib_slklab.po: unctrl.h
+lib_slkrefr.So: curses.h
+lib_slkrefr.So: ncurses_def.h
+lib_slkrefr.So: term.h
+lib_slkrefr.So: unctrl.h
+lib_slkrefr.o: curses.h
+lib_slkrefr.o: ncurses_def.h
+lib_slkrefr.o: term.h
+lib_slkrefr.o: unctrl.h
+lib_slkrefr.po: curses.h
+lib_slkrefr.po: ncurses_def.h
+lib_slkrefr.po: term.h
+lib_slkrefr.po: unctrl.h
+lib_slkset.So: curses.h
+lib_slkset.So: ncurses_def.h
+lib_slkset.So: term.h
+lib_slkset.So: unctrl.h
+lib_slkset.o: curses.h
+lib_slkset.o: ncurses_def.h
+lib_slkset.o: term.h
+lib_slkset.o: unctrl.h
+lib_slkset.po: curses.h
+lib_slkset.po: ncurses_def.h
+lib_slkset.po: term.h
+lib_slkset.po: unctrl.h
+lib_slktouch.So: curses.h
+lib_slktouch.So: ncurses_def.h
+lib_slktouch.So: term.h
+lib_slktouch.So: unctrl.h
+lib_slktouch.o: curses.h
+lib_slktouch.o: ncurses_def.h
+lib_slktouch.o: term.h
+lib_slktouch.o: unctrl.h
+lib_slktouch.po: curses.h
+lib_slktouch.po: ncurses_def.h
+lib_slktouch.po: term.h
+lib_slktouch.po: unctrl.h
+lib_termcap.So: curses.h
+lib_termcap.So: ncurses_def.h
+lib_termcap.So: term.h
+lib_termcap.So: termcap.h
+lib_termcap.So: unctrl.h
+lib_termcap.o: curses.h
+lib_termcap.o: ncurses_def.h
+lib_termcap.o: term.h
+lib_termcap.o: termcap.h
+lib_termcap.o: unctrl.h
+lib_termcap.po: curses.h
+lib_termcap.po: ncurses_def.h
+lib_termcap.po: term.h
+lib_termcap.po: termcap.h
+lib_termcap.po: unctrl.h
+lib_termname.So: curses.h
+lib_termname.So: ncurses_def.h
+lib_termname.So: term.h
+lib_termname.So: unctrl.h
+lib_termname.o: curses.h
+lib_termname.o: ncurses_def.h
+lib_termname.o: term.h
+lib_termname.o: unctrl.h
+lib_termname.po: curses.h
+lib_termname.po: ncurses_def.h
+lib_termname.po: term.h
+lib_termname.po: unctrl.h
+lib_tgoto.So: curses.h
+lib_tgoto.So: ncurses_def.h
+lib_tgoto.So: term.h
+lib_tgoto.So: termcap.h
+lib_tgoto.So: unctrl.h
+lib_tgoto.o: curses.h
+lib_tgoto.o: ncurses_def.h
+lib_tgoto.o: term.h
+lib_tgoto.o: termcap.h
+lib_tgoto.o: unctrl.h
+lib_tgoto.po: curses.h
+lib_tgoto.po: ncurses_def.h
+lib_tgoto.po: term.h
+lib_tgoto.po: termcap.h
+lib_tgoto.po: unctrl.h
+lib_ti.So: curses.h
+lib_ti.So: ncurses_def.h
+lib_ti.So: term.h
+lib_ti.So: unctrl.h
+lib_ti.o: curses.h
+lib_ti.o: ncurses_def.h
+lib_ti.o: term.h
+lib_ti.o: unctrl.h
+lib_ti.po: curses.h
+lib_ti.po: ncurses_def.h
+lib_ti.po: term.h
+lib_ti.po: unctrl.h
+lib_touch.So: curses.h
+lib_touch.So: ncurses_def.h
+lib_touch.So: term.h
+lib_touch.So: unctrl.h
+lib_touch.o: curses.h
+lib_touch.o: ncurses_def.h
+lib_touch.o: term.h
+lib_touch.o: unctrl.h
+lib_touch.po: curses.h
+lib_touch.po: ncurses_def.h
+lib_touch.po: term.h
+lib_touch.po: unctrl.h
+lib_tparm.So: curses.h
+lib_tparm.So: ncurses_def.h
+lib_tparm.So: term.h
+lib_tparm.So: unctrl.h
+lib_tparm.o: curses.h
+lib_tparm.o: ncurses_def.h
+lib_tparm.o: term.h
+lib_tparm.o: unctrl.h
+lib_tparm.po: curses.h
+lib_tparm.po: ncurses_def.h
+lib_tparm.po: term.h
+lib_tparm.po: unctrl.h
+lib_tputs.So: curses.h
+lib_tputs.So: ncurses_def.h
+lib_tputs.So: term.h
+lib_tputs.So: termcap.h
+lib_tputs.So: unctrl.h
+lib_tputs.o: curses.h
+lib_tputs.o: ncurses_def.h
+lib_tputs.o: term.h
+lib_tputs.o: termcap.h
+lib_tputs.o: unctrl.h
+lib_tputs.po: curses.h
+lib_tputs.po: ncurses_def.h
+lib_tputs.po: term.h
+lib_tputs.po: termcap.h
+lib_tputs.po: unctrl.h
+lib_trace.So: curses.h
+lib_trace.So: ncurses_def.h
+lib_trace.So: term.h
+lib_trace.So: unctrl.h
+lib_trace.o: curses.h
+lib_trace.o: ncurses_def.h
+lib_trace.o: term.h
+lib_trace.o: unctrl.h
+lib_trace.po: curses.h
+lib_trace.po: ncurses_def.h
+lib_trace.po: term.h
+lib_trace.po: unctrl.h
+lib_tstp.So: curses.h
+lib_tstp.So: ncurses_def.h
+lib_tstp.So: term.h
+lib_tstp.So: unctrl.h
+lib_tstp.o: curses.h
+lib_tstp.o: ncurses_def.h
+lib_tstp.o: term.h
+lib_tstp.o: unctrl.h
+lib_tstp.po: curses.h
+lib_tstp.po: ncurses_def.h
+lib_tstp.po: term.h
+lib_tstp.po: unctrl.h
+lib_ttyflags.So: curses.h
+lib_ttyflags.So: ncurses_def.h
+lib_ttyflags.So: term.h
+lib_ttyflags.So: unctrl.h
+lib_ttyflags.o: curses.h
+lib_ttyflags.o: ncurses_def.h
+lib_ttyflags.o: term.h
+lib_ttyflags.o: unctrl.h
+lib_ttyflags.po: curses.h
+lib_ttyflags.po: ncurses_def.h
+lib_ttyflags.po: term.h
+lib_ttyflags.po: unctrl.h
+lib_twait.So: curses.h
+lib_twait.So: ncurses_def.h
+lib_twait.So: term.h
+lib_twait.So: unctrl.h
+lib_twait.o: curses.h
+lib_twait.o: ncurses_def.h
+lib_twait.o: term.h
+lib_twait.o: unctrl.h
+lib_twait.po: curses.h
+lib_twait.po: ncurses_def.h
+lib_twait.po: term.h
+lib_twait.po: unctrl.h
+lib_unget_wch.So: curses.h
+lib_unget_wch.So: ncurses_def.h
+lib_unget_wch.So: term.h
+lib_unget_wch.So: unctrl.h
+lib_unget_wch.o: curses.h
+lib_unget_wch.o: ncurses_def.h
+lib_unget_wch.o: term.h
+lib_unget_wch.o: unctrl.h
+lib_unget_wch.po: curses.h
+lib_unget_wch.po: ncurses_def.h
+lib_unget_wch.po: term.h
+lib_unget_wch.po: unctrl.h
+lib_ungetch.So: curses.h
+lib_ungetch.So: ncurses_def.h
+lib_ungetch.So: term.h
+lib_ungetch.So: unctrl.h
+lib_ungetch.o: curses.h
+lib_ungetch.o: ncurses_def.h
+lib_ungetch.o: term.h
+lib_ungetch.o: unctrl.h
+lib_ungetch.po: curses.h
+lib_ungetch.po: ncurses_def.h
+lib_ungetch.po: term.h
+lib_ungetch.po: unctrl.h
+lib_vid_attr.So: curses.h
+lib_vid_attr.So: ncurses_def.h
+lib_vid_attr.So: term.h
+lib_vid_attr.So: unctrl.h
+lib_vid_attr.o: curses.h
+lib_vid_attr.o: ncurses_def.h
+lib_vid_attr.o: term.h
+lib_vid_attr.o: unctrl.h
+lib_vid_attr.po: curses.h
+lib_vid_attr.po: ncurses_def.h
+lib_vid_attr.po: term.h
+lib_vid_attr.po: unctrl.h
+lib_vidattr.So: curses.h
+lib_vidattr.So: ncurses_def.h
+lib_vidattr.So: term.h
+lib_vidattr.So: unctrl.h
+lib_vidattr.o: curses.h
+lib_vidattr.o: ncurses_def.h
+lib_vidattr.o: term.h
+lib_vidattr.o: unctrl.h
+lib_vidattr.po: curses.h
+lib_vidattr.po: ncurses_def.h
+lib_vidattr.po: term.h
+lib_vidattr.po: unctrl.h
+lib_vline.So: curses.h
+lib_vline.So: ncurses_def.h
+lib_vline.So: term.h
+lib_vline.So: unctrl.h
+lib_vline.o: curses.h
+lib_vline.o: ncurses_def.h
+lib_vline.o: term.h
+lib_vline.o: unctrl.h
+lib_vline.po: curses.h
+lib_vline.po: ncurses_def.h
+lib_vline.po: term.h
+lib_vline.po: unctrl.h
+lib_vline_set.So: curses.h
+lib_vline_set.So: ncurses_def.h
+lib_vline_set.So: term.h
+lib_vline_set.So: unctrl.h
+lib_vline_set.o: curses.h
+lib_vline_set.o: ncurses_def.h
+lib_vline_set.o: term.h
+lib_vline_set.o: unctrl.h
+lib_vline_set.po: curses.h
+lib_vline_set.po: ncurses_def.h
+lib_vline_set.po: term.h
+lib_vline_set.po: unctrl.h
+lib_wacs.So: curses.h
+lib_wacs.So: ncurses_def.h
+lib_wacs.So: term.h
+lib_wacs.So: unctrl.h
+lib_wacs.o: curses.h
+lib_wacs.o: ncurses_def.h
+lib_wacs.o: term.h
+lib_wacs.o: unctrl.h
+lib_wacs.po: curses.h
+lib_wacs.po: ncurses_def.h
+lib_wacs.po: term.h
+lib_wacs.po: unctrl.h
+lib_wattroff.So: curses.h
+lib_wattroff.So: ncurses_def.h
+lib_wattroff.So: term.h
+lib_wattroff.So: unctrl.h
+lib_wattroff.o: curses.h
+lib_wattroff.o: ncurses_def.h
+lib_wattroff.o: term.h
+lib_wattroff.o: unctrl.h
+lib_wattroff.po: curses.h
+lib_wattroff.po: ncurses_def.h
+lib_wattroff.po: term.h
+lib_wattroff.po: unctrl.h
+lib_wattron.So: curses.h
+lib_wattron.So: ncurses_def.h
+lib_wattron.So: term.h
+lib_wattron.So: unctrl.h
+lib_wattron.o: curses.h
+lib_wattron.o: ncurses_def.h
+lib_wattron.o: term.h
+lib_wattron.o: unctrl.h
+lib_wattron.po: curses.h
+lib_wattron.po: ncurses_def.h
+lib_wattron.po: term.h
+lib_wattron.po: unctrl.h
+lib_winch.So: curses.h
+lib_winch.So: ncurses_def.h
+lib_winch.So: term.h
+lib_winch.So: unctrl.h
+lib_winch.o: curses.h
+lib_winch.o: ncurses_def.h
+lib_winch.o: term.h
+lib_winch.o: unctrl.h
+lib_winch.po: curses.h
+lib_winch.po: ncurses_def.h
+lib_winch.po: term.h
+lib_winch.po: unctrl.h
+lib_window.So: curses.h
+lib_window.So: ncurses_def.h
+lib_window.So: term.h
+lib_window.So: unctrl.h
+lib_window.o: curses.h
+lib_window.o: ncurses_def.h
+lib_window.o: term.h
+lib_window.o: unctrl.h
+lib_window.po: curses.h
+lib_window.po: ncurses_def.h
+lib_window.po: term.h
+lib_window.po: unctrl.h
+lib_wunctrl.So: curses.h
+lib_wunctrl.So: ncurses_def.h
+lib_wunctrl.So: term.h
+lib_wunctrl.So: unctrl.h
+lib_wunctrl.o: curses.h
+lib_wunctrl.o: ncurses_def.h
+lib_wunctrl.o: term.h
+lib_wunctrl.o: unctrl.h
+lib_wunctrl.po: curses.h
+lib_wunctrl.po: ncurses_def.h
+lib_wunctrl.po: term.h
+lib_wunctrl.po: unctrl.h
+memmove.So: curses.h
+memmove.So: ncurses_def.h
+memmove.So: term.h
+memmove.So: unctrl.h
+memmove.o: curses.h
+memmove.o: ncurses_def.h
+memmove.o: term.h
+memmove.o: unctrl.h
+memmove.po: curses.h
+memmove.po: ncurses_def.h
+memmove.po: term.h
+memmove.po: unctrl.h
+name_match.So: curses.h
+name_match.So: ncurses_def.h
+name_match.So: term.h
+name_match.So: unctrl.h
+name_match.o: curses.h
+name_match.o: ncurses_def.h
+name_match.o: term.h
+name_match.o: unctrl.h
+name_match.po: curses.h
+name_match.po: ncurses_def.h
+name_match.po: term.h
+name_match.po: unctrl.h
+names.So: curses.h
+names.So: names.c
+names.So: ncurses_def.h
+names.So: term.h
+names.So: unctrl.h
+names.o: curses.h
+names.o: names.c
+names.o: ncurses_def.h
+names.o: term.h
+names.o: unctrl.h
+names.po: curses.h
+names.po: names.c
+names.po: ncurses_def.h
+names.po: term.h
+names.po: unctrl.h
+nc_panel.So: curses.h
+nc_panel.So: ncurses_def.h
+nc_panel.So: term.h
+nc_panel.So: unctrl.h
+nc_panel.o: curses.h
+nc_panel.o: ncurses_def.h
+nc_panel.o: term.h
+nc_panel.o: unctrl.h
+nc_panel.po: curses.h
+nc_panel.po: ncurses_def.h
+nc_panel.po: term.h
+nc_panel.po: unctrl.h
+parse_entry.So: curses.h
+parse_entry.So: ncurses_def.h
+parse_entry.So: parametrized.h
+parse_entry.So: term.h
+parse_entry.So: unctrl.h
+parse_entry.o: curses.h
+parse_entry.o: ncurses_def.h
+parse_entry.o: parametrized.h
+parse_entry.o: term.h
+parse_entry.o: unctrl.h
+parse_entry.po: curses.h
+parse_entry.po: ncurses_def.h
+parse_entry.po: parametrized.h
+parse_entry.po: term.h
+parse_entry.po: unctrl.h
+read_entry.So: curses.h
+read_entry.So: ncurses_def.h
+read_entry.So: term.h
+read_entry.So: unctrl.h
+read_entry.o: curses.h
+read_entry.o: ncurses_def.h
+read_entry.o: term.h
+read_entry.o: unctrl.h
+read_entry.po: curses.h
+read_entry.po: ncurses_def.h
+read_entry.po: term.h
+read_entry.po: unctrl.h
+resizeterm.So: curses.h
+resizeterm.So: ncurses_def.h
+resizeterm.So: term.h
+resizeterm.So: unctrl.h
+resizeterm.o: curses.h
+resizeterm.o: ncurses_def.h
+resizeterm.o: term.h
+resizeterm.o: unctrl.h
+resizeterm.po: curses.h
+resizeterm.po: ncurses_def.h
+resizeterm.po: term.h
+resizeterm.po: unctrl.h
+safe_sprintf.So: curses.h
+safe_sprintf.So: ncurses_def.h
+safe_sprintf.So: term.h
+safe_sprintf.So: unctrl.h
+safe_sprintf.o: curses.h
+safe_sprintf.o: ncurses_def.h
+safe_sprintf.o: term.h
+safe_sprintf.o: unctrl.h
+safe_sprintf.po: curses.h
+safe_sprintf.po: ncurses_def.h
+safe_sprintf.po: term.h
+safe_sprintf.po: unctrl.h
+setbuf.So: curses.h
+setbuf.So: ncurses_def.h
+setbuf.So: term.h
+setbuf.So: unctrl.h
+setbuf.o: curses.h
+setbuf.o: ncurses_def.h
+setbuf.o: term.h
+setbuf.o: unctrl.h
+setbuf.po: curses.h
+setbuf.po: ncurses_def.h
+setbuf.po: term.h
+setbuf.po: unctrl.h
+strings.So: curses.h
+strings.So: ncurses_def.h
+strings.So: term.h
+strings.So: unctrl.h
+strings.o: curses.h
+strings.o: ncurses_def.h
+strings.o: term.h
+strings.o: unctrl.h
+strings.po: curses.h
+strings.po: ncurses_def.h
+strings.po: term.h
+strings.po: unctrl.h
+termcap.So: curses.h
+termcap.So: ncurses_def.h
+termcap.So: term.h
+termcap.So: unctrl.h
+termcap.o: curses.h
+termcap.o: ncurses_def.h
+termcap.o: term.h
+termcap.o: unctrl.h
+termcap.po: curses.h
+termcap.po: ncurses_def.h
+termcap.po: term.h
+termcap.po: unctrl.h
+tries.So: curses.h
+tries.So: ncurses_def.h
+tries.So: term.h
+tries.So: unctrl.h
+tries.o: curses.h
+tries.o: ncurses_def.h
+tries.o: term.h
+tries.o: unctrl.h
+tries.po: curses.h
+tries.po: ncurses_def.h
+tries.po: term.h
+tries.po: unctrl.h
+trim_sgr0.So: curses.h
+trim_sgr0.So: ncurses_def.h
+trim_sgr0.So: term.h
+trim_sgr0.So: unctrl.h
+trim_sgr0.o: curses.h
+trim_sgr0.o: ncurses_def.h
+trim_sgr0.o: term.h
+trim_sgr0.o: unctrl.h
+trim_sgr0.po: curses.h
+trim_sgr0.po: ncurses_def.h
+trim_sgr0.po: term.h
+trim_sgr0.po: unctrl.h
+tty_update.So: curses.h
+tty_update.So: ncurses_def.h
+tty_update.So: term.h
+tty_update.So: unctrl.h
+tty_update.o: curses.h
+tty_update.o: ncurses_def.h
+tty_update.o: term.h
+tty_update.o: unctrl.h
+tty_update.po: curses.h
+tty_update.po: ncurses_def.h
+tty_update.po: term.h
+tty_update.po: unctrl.h
+unctrl.So: curses.h
+unctrl.So: ncurses_def.h
+unctrl.So: term.h
+unctrl.So: unctrl.c
+unctrl.So: unctrl.h
+unctrl.o: curses.h
+unctrl.o: ncurses_def.h
+unctrl.o: term.h
+unctrl.o: unctrl.c
+unctrl.o: unctrl.h
+unctrl.po: curses.h
+unctrl.po: ncurses_def.h
+unctrl.po: term.h
+unctrl.po: unctrl.c
+unctrl.po: unctrl.h
+version.So: curses.h
+version.So: ncurses_def.h
+version.So: term.h
+version.So: unctrl.h
+version.o: curses.h
+version.o: ncurses_def.h
+version.o: term.h
+version.o: unctrl.h
+version.po: curses.h
+version.po: ncurses_def.h
+version.po: term.h
+version.po: unctrl.h
+visbuf.So: curses.h
+visbuf.So: ncurses_def.h
+visbuf.So: term.h
+visbuf.So: unctrl.h
+visbuf.o: curses.h
+visbuf.o: ncurses_def.h
+visbuf.o: term.h
+visbuf.o: unctrl.h
+visbuf.po: curses.h
+visbuf.po: ncurses_def.h
+visbuf.po: term.h
+visbuf.po: unctrl.h
+vsscanf.So: curses.h
+vsscanf.So: ncurses_def.h
+vsscanf.So: term.h
+vsscanf.So: unctrl.h
+vsscanf.o: curses.h
+vsscanf.o: ncurses_def.h
+vsscanf.o: term.h
+vsscanf.o: unctrl.h
+vsscanf.po: curses.h
+vsscanf.po: ncurses_def.h
+vsscanf.po: term.h
+vsscanf.po: unctrl.h
+wresize.So: curses.h
+wresize.So: ncurses_def.h
+wresize.So: term.h
+wresize.So: unctrl.h
+wresize.o: curses.h
+wresize.o: ncurses_def.h
+wresize.o: term.h
+wresize.o: unctrl.h
+wresize.po: curses.h
+wresize.po: ncurses_def.h
+wresize.po: term.h
+wresize.po: unctrl.h
+write_entry.So: curses.h
+write_entry.So: ncurses_def.h
+write_entry.So: term.h
+write_entry.So: unctrl.h
+write_entry.o: curses.h
+write_entry.o: ncurses_def.h
+write_entry.o: term.h
+write_entry.o: unctrl.h
+write_entry.po: curses.h
+write_entry.po: ncurses_def.h
+write_entry.po: term.h
+write_entry.po: unctrl.h
+.endif
diff --git a/lib/ncurses/panel/Makefile.depend b/lib/ncurses/panel/Makefile.depend
new file mode 100644
index 0000000..3f1939e
--- /dev/null
+++ b/lib/ncurses/panel/Makefile.depend
@@ -0,0 +1,62 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/ncurses/ncurses \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+p_above.So: ncurses_def.h
+p_above.o: ncurses_def.h
+p_above.po: ncurses_def.h
+p_below.So: ncurses_def.h
+p_below.o: ncurses_def.h
+p_below.po: ncurses_def.h
+p_bottom.So: ncurses_def.h
+p_bottom.o: ncurses_def.h
+p_bottom.po: ncurses_def.h
+p_delete.So: ncurses_def.h
+p_delete.o: ncurses_def.h
+p_delete.po: ncurses_def.h
+p_hidden.So: ncurses_def.h
+p_hidden.o: ncurses_def.h
+p_hidden.po: ncurses_def.h
+p_hide.So: ncurses_def.h
+p_hide.o: ncurses_def.h
+p_hide.po: ncurses_def.h
+p_move.So: ncurses_def.h
+p_move.o: ncurses_def.h
+p_move.po: ncurses_def.h
+p_new.So: ncurses_def.h
+p_new.o: ncurses_def.h
+p_new.po: ncurses_def.h
+p_replace.So: ncurses_def.h
+p_replace.o: ncurses_def.h
+p_replace.po: ncurses_def.h
+p_show.So: ncurses_def.h
+p_show.o: ncurses_def.h
+p_show.po: ncurses_def.h
+p_top.So: ncurses_def.h
+p_top.o: ncurses_def.h
+p_top.po: ncurses_def.h
+p_update.So: ncurses_def.h
+p_update.o: ncurses_def.h
+p_update.po: ncurses_def.h
+p_user.So: ncurses_def.h
+p_user.o: ncurses_def.h
+p_user.po: ncurses_def.h
+p_win.So: ncurses_def.h
+p_win.o: ncurses_def.h
+p_win.po: ncurses_def.h
+panel.So: ncurses_def.h
+panel.o: ncurses_def.h
+panel.po: ncurses_def.h
+.endif
diff --git a/lib/ncurses/panelw/Makefile.depend b/lib/ncurses/panelw/Makefile.depend
new file mode 100644
index 0000000..18cd49b
--- /dev/null
+++ b/lib/ncurses/panelw/Makefile.depend
@@ -0,0 +1,62 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/ncurses/ncursesw \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+p_above.So: ncurses_def.h
+p_above.o: ncurses_def.h
+p_above.po: ncurses_def.h
+p_below.So: ncurses_def.h
+p_below.o: ncurses_def.h
+p_below.po: ncurses_def.h
+p_bottom.So: ncurses_def.h
+p_bottom.o: ncurses_def.h
+p_bottom.po: ncurses_def.h
+p_delete.So: ncurses_def.h
+p_delete.o: ncurses_def.h
+p_delete.po: ncurses_def.h
+p_hidden.So: ncurses_def.h
+p_hidden.o: ncurses_def.h
+p_hidden.po: ncurses_def.h
+p_hide.So: ncurses_def.h
+p_hide.o: ncurses_def.h
+p_hide.po: ncurses_def.h
+p_move.So: ncurses_def.h
+p_move.o: ncurses_def.h
+p_move.po: ncurses_def.h
+p_new.So: ncurses_def.h
+p_new.o: ncurses_def.h
+p_new.po: ncurses_def.h
+p_replace.So: ncurses_def.h
+p_replace.o: ncurses_def.h
+p_replace.po: ncurses_def.h
+p_show.So: ncurses_def.h
+p_show.o: ncurses_def.h
+p_show.po: ncurses_def.h
+p_top.So: ncurses_def.h
+p_top.o: ncurses_def.h
+p_top.po: ncurses_def.h
+p_update.So: ncurses_def.h
+p_update.o: ncurses_def.h
+p_update.po: ncurses_def.h
+p_user.So: ncurses_def.h
+p_user.o: ncurses_def.h
+p_user.po: ncurses_def.h
+p_win.So: ncurses_def.h
+p_win.o: ncurses_def.h
+p_win.po: ncurses_def.h
+panel.So: ncurses_def.h
+panel.o: ncurses_def.h
+panel.po: ncurses_def.h
+.endif
OpenPOWER on IntegriCloud